Mercurial > hg > octave-nkf
changeset 20492:977853866d69
Flip gnuplot range values rather than use reverse/noreverse (bug #38914)
* __go_draw_axes__.m (__go_draw_axes__): Remove the "reverse/noreverse" option
from all "set xrange/x2range/yrange/y2range/zrange" commands and instead flip
xlim/ylim/zlim appropriately.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Sat, 23 May 2015 23:52:58 -0500 |
parents | 5db7eea18d76 |
children | 085c99b96aed |
files | scripts/plot/util/private/__go_draw_axes__.m |
diffstat | 1 files changed, 9 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/private/__go_draw_axes__.m +++ b/scripts/plot/util/private/__go_draw_axes__.m @@ -1425,26 +1425,23 @@ return; endif if (strcmpi (axis_obj.xdir, "reverse")) - xdir = "reverse"; - else - xdir = "noreverse"; + xlim = flip (xlim); endif - fprintf (plot_stream, "set xrange [%.15e:%.15e] %s;\n", xlim, xdir); + + fprintf (plot_stream, "set xrange [%.15e:%.15e];\n", xlim); if (strcmpi (axis_obj.xaxislocation, "top")) - fprintf (plot_stream, "set x2range [%.15e:%.15e] %s;\n", xlim, xdir); + fprintf (plot_stream, "set x2range [%.15e:%.15e];\n", xlim); endif if (isempty (ylim)) return; endif if (strcmpi (axis_obj.ydir, "reverse")) - ydir = "reverse"; - else - ydir = "noreverse"; + ylim = flip (ylim); endif - fprintf (plot_stream, "set yrange [%.15e:%.15e] %s;\n", ylim, ydir); + fprintf (plot_stream, "set yrange [%.15e:%.15e];\n", ylim); if (strcmpi (axis_obj.yaxislocation, "right")) - fprintf (plot_stream, "set y2range [%.15e:%.15e] %s;\n", ylim, ydir); + fprintf (plot_stream, "set y2range [%.15e:%.15e];\n", ylim); endif if (nd == 3) @@ -1452,11 +1449,9 @@ return; endif if (strcmpi (axis_obj.zdir, "reverse")) - zdir = "reverse"; - else - zdir = "noreverse"; + zlim = flip (zlim); endif - fprintf (plot_stream, "set zrange [%.15e:%.15e] %s;\n", zlim, zdir); + fprintf (plot_stream, "set zrange [%.15e:%.15e];\n", zlim); endif cmap = parent_figure_obj.colormap;