# HG changeset patch # User Daniel J Sebald # Date 1432443178 18000 # Node ID 977853866d6969358ceb20421a54b736e3e26894 # Parent 5db7eea18d76efcf9c6ae2ccb529664a5c0dca09 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. diff -r 5db7eea18d76 -r 977853866d69 scripts/plot/util/private/__go_draw_axes__.m --- a/scripts/plot/util/private/__go_draw_axes__.m Wed Jun 24 14:40:22 2015 -0400 +++ b/scripts/plot/util/private/__go_draw_axes__.m Sat May 23 23:52:58 2015 -0500 @@ -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;