diff scripts/plot/private/__go_draw_axes__.m @ 13216:434e227b100b

Improvements to plotyy. * scripts/plot/plotyy.m: Don't use "tag" or "userdata" manage plotyy axes. * scripts/plot/legend.m: Ditto. * scripts/plot/private/__go_draw_axes__.m: Ditto. * src/gl-render.cc: Ditto.
author Ben Abbott <bpabbott@mac.com>
date Sun, 25 Sep 2011 13:48:09 -0400
parents 9eff72139c05
children e9f6a6edec42
line wrap: on
line diff
--- a/scripts/plot/private/__go_draw_axes__.m	Sun Sep 25 19:11:02 2011 +0200
+++ b/scripts/plot/private/__go_draw_axes__.m	Sun Sep 25 13:48:09 2011 -0400
@@ -40,10 +40,16 @@
     gnuplot_term = __gnuplot_get_var__ (axis_obj.parent, "GPVAL_TERM");
 
     ## Set to false for plotyy axes.
-    if (strcmp (axis_obj.tag, "plotyy"))
-      ymirror = false;
-    else
-      ymirror = true;
+    ymirror = true;
+    if (isfield (axis_obj, "__plotyy_axes__"))
+      if (all (ishandle (axis_obj.__plotyy_axes__)))
+        ymirror = false;
+      else
+        h = axis_obj.__plotyy_axes__;
+        h = h(ishandle (h));
+        h = h(isprop (h, "__ploty_axes__"));
+        rmappdata (h, "__plotyy_axes__")
+      endif
     endif
 
     nd = __calc_dimensions__ (h);