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?
-
I tried to follow the advice of DanielTuzes below, to somehow apply `set yrange reverse` or `set yrange [high:low]`, but I wasn't able to get it to work. There is a plotting option `gnuplot_postamble` which is supposed to supply Gnuplot options which are output after other automatically-generated stuff, but I find, on looking at an example output, that `set yrange` is generated after anything specified by `gnuplot_postamble`, so `gnuplot_postamble` didn't affect `yrange`. That's probably a bug in `gnuplot_postamble`. – Robert Dodier Dec 29 '21 at 23:55
-
At this point my advice is `set_plot_option([plot_format, gnuplot])` so that all the Gnuplot commands are output to a file (otherwise it uses pipes), and then copy and edit the generated Gnuplot file to apply `set yrange` as needed. (plot2d reports the names of its output files, so you can find the Gnuplot output.) – Robert Dodier Dec 29 '21 at 23:57
1 Answers
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 aects 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].

- 2,494
- 24
- 40