changeset 8894:4414e555505d

__go_draw_axes__.m: Do not render axis labels twice when their handles are visible.
author Ben Abbott <bpabbott@mac.com>
date Sun, 01 Mar 2009 11:39:45 -0500
parents 937b58380b6a
children ac8f5a159c2c
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Sun Mar 01 09:49:37 2009 -0500
+++ b/scripts/ChangeLog	Sun Mar 01 11:39:45 2009 -0500
@@ -1,3 +1,9 @@
+2009-03-01  Ben Abbott <bpabbott@mac.com>
+
+	* plot/__go_draw_axes__.m: Do not render axis labels twice when
+	their handles are visible, but do render objects with hidden
+	handles.
+
 2009-03-01  Ben Abbott <bpabbott@mac.com>
 
 	* general/num2str.m: Trivial bug fix. Recent switch from split()
--- a/scripts/plot/__go_draw_axes__.m	Sun Mar 01 09:49:37 2009 -0500
+++ b/scripts/plot/__go_draw_axes__.m	Sun Mar 01 11:39:45 2009 -0500
@@ -27,7 +27,13 @@
 
   if (nargin >= 4 && nargin <= 5)
 
-    axis_obj = __get__ (h);
+    showhiddenhandles = get (0, "showhiddenhandles");
+    unwind_protect
+      set (0, "showhiddenhandles", "on");
+      axis_obj = __get__ (h);
+    unwind_protect_cleanup
+      set (0, "showhiddenhandles", showhiddenhandles);
+    end_unwind_protect
 
     parent_figure_obj = get (axis_obj.parent);
 
@@ -288,6 +294,8 @@
     fputs (plot_stream, "set clip two;\n");
 
     kids = axis_obj.children;
+    kids = setdiff (kids, [axis_obj.xlabel, axis_obj.ylabel, ...
+                           axis_obj.zlabel, axis_obj.title]);
 
     if (nd == 3)
       fputs (plot_stream, "set parametric;\n");