changeset 6280:1705b7847b8e

[project @ 2007-02-08 04:03:22 by jwe]
author jwe
date Thu, 08 Feb 2007 04:03:22 +0000
parents 195382e92d51
children 2298ae7ff342
files scripts/ChangeLog scripts/plot/__uiobject_draw_axes__.m
diffstat 2 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Feb 08 03:47:19 2007 +0000
+++ b/scripts/ChangeLog	Thu Feb 08 04:03:22 2007 +0000
@@ -1,5 +1,8 @@
 2007-02-07  John W. Eaton  <jwe@octave.org>
 
+	* plot/__uiobject_draw_axes__.m: Handle xdir, ydir, and zdir axis
+	properties.
+
 	* plot/sombrero.m: Call box ("off") after mesh.
 
 	* plot/__uiobject_draw_axes__.m: Avoid rgb colors and "set style
--- a/scripts/plot/__uiobject_draw_axes__.m	Thu Feb 08 03:47:19 2007 +0000
+++ b/scripts/plot/__uiobject_draw_axes__.m	Thu Feb 08 04:03:22 2007 +0000
@@ -476,7 +476,12 @@
     else
       xlim = axis_obj.xlim;
     endif
-    fprintf (plot_stream, "set xrange [%g:%g];\n", xlim);
+    if (strcmp (axis_obj.xdir, "reverse"))
+      xdir = "reverse";
+    else
+      xdir = "noreverse";
+    endif
+    fprintf (plot_stream, "set xrange [%g:%g] %s;\n", xlim, xdir);
 
     if (yautoscale && have_data)
       ylim = get_axis_limits (ymin, ymax, yminp, ylogscale);
@@ -484,7 +489,12 @@
     else
       ylim = axis_obj.ylim;
     endif
-    fprintf (plot_stream, "set yrange [%g:%g];\n", ylim);
+    if (strcmp (axis_obj.ydir, "reverse"))
+      ydir = "reverse";
+    else
+      ydir = "noreverse";
+    endif
+    fprintf (plot_stream, "set yrange [%g:%g] %s;\n", ylim, ydir);
 
     if (nd == 3)
       if (zautoscale && have_data)
@@ -493,7 +503,12 @@
       else
 	zlim = axis_obj.zlim;
       endif
-      fprintf (plot_stream, "set zrange [%g:%g];\n", zlim);
+      if (strcmp (axis_obj.zdir, "reverse"))
+	zdir = "reverse";
+      else
+	zdir = "noreverse";
+      endif
+      fprintf (plot_stream, "set zrange [%g:%g] %s;\n", zlim, zdir);
     endif
 
     if (strcmp (axis_obj.box, "on"))