gnuplotmaximawxmaxima

Reverse abscissa/ordinate axis in wxdraw2d or wxplot2d wxmaxima


By default, the draw/plot function plots y-axis values in ascending order (from bottom to top). In other words, -ve values are at the bottom of the graph and +ve values above the origin (towards the top of the plot). Can we reverse (see the figure attached) this behavior for the individual axis or both?

enter image description here


Solution

  • It is possible in gnuplot, by passing set xrange reverse and set yrange reverse, but wxmaxima does not provide a full interface for gnuplot, however, it seems that direct access may be possible. As from the docs:

    2.3.5 Opening gnuplot’s command console in plot windows On MS Windows, if in Maxima’s variable gnuplot_command “gnuplot” is replaced by “wgnuplot”, gnuplot offers the possibility to open a console window, where gnuplot commands can be entered into. Unfortunately, enabling this feature causes gnuplot to “steal” the keyboard focus for a short time every time a plot is prepared.

    Please also note that there is a difference in gnuplot 4 and 5:

    The reverse keyword of the set [axis]range command a ects only autoscaling. It does not invert or otherwise alter the meaning of a command such as set xrange [0:1]. If you want to reverse the direction of the x axis in such a case, say instead set xrange [1:0].