[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Changeset] plotyy leaves traces of previous plots
From: |
John W. Eaton |
Subject: |
RE: [Changeset] plotyy leaves traces of previous plots |
Date: |
Fri, 28 Mar 2008 16:18:11 -0400 |
On 28-Mar-2008, Bateman David-ADB014 wrote:
| Shai, Micheal,
|
| John suggested I should direct a question at you and the rest of the
maintainers list but what is the expected behavior of newplot in the case of
plotyy and what is the correct means to detect that an axes forms part of a set
of axes in a plotyy figure. The details of the conversation are below. John I
don't have easy access to the patch I sent to newplot for discussion, so could
you forward it?
|
Here it is.
jwe
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1206728074 -3600
# Node ID 52df9bf6372644301b0a122d34a3511c82f66fa8
# Parent d5c0872287bca7308029db34cd054a659fd3a7d7
Treat plotyy in newplot
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@ 2008-03-27 Soren Hauberg <address@hidden
+2008-03-28 David Bateman <address@hidden>
+
+ * plot/newplot.m: Treat the case of plotyy.
+
2008-03-27 Soren Hauberg <address@hidden>
* plot/xlim.m, plot/ylim.m, plot/zlim.m, strings/strtrim.m:
diff --git a/scripts/plot/newplot.m b/scripts/plot/newplot.m
--- a/scripts/plot/newplot.m
+++ b/scripts/plot/newplot.m
@@ -39,16 +39,38 @@ function newplot ()
error ("newplot: unrecognized nextplot property for current figure");
endswitch
ca = gca ();
- anp = get (ca, "nextplot");
- switch (anp)
- case "add"
- case "replacechildren"
- case "replace"
- __go_axes_init__ (ca, "replace");
- __request_drawnow__ ();
- otherwise
- error ("newplot: unrecognized nextplot property for current axes");
- endswitch
+ if (strcmpi (get (ca, "activepositionproperty"), "outerposition"))
+ anp = get (ca, "nextplot");
+ switch (anp)
+ case "add"
+ case "replacechildren"
+ case "replace"
+ __go_axes_init__ (ca, "replace");
+ __request_drawnow__ ();
+ otherwise
+ error ("newplot: unrecognized nextplot property for current axes");
+ endswitch
+ else
+ ## This is probably a plotyy axes. Special case to treat both axes
+ child = get (cf, "children");
+ for i = 1 : length (child)
+ nca = child(i);
+ anp = get (nca, "nextplot");
+ switch (anp)
+ case "add"
+ case "replacechildren"
+ case "replace"
+ if (ca == nca)
+ __go_axes_init__ (ca, "replace");
+ else
+ delete (nca);
+ endif
+ otherwise
+ error ("newplot: unrecognized nextplot property for current axes");
+ endswitch
+ endfor
+ __request_drawnow__ ();
+ endif
else
print_usage ();
endif
- RE: [Changeset] plotyy leaves traces of previous plots, Bateman David-ADB014, 2008/03/28
- RE: [Changeset] plotyy leaves traces of previous plots,
John W. Eaton <=
- Re: [Changeset] plotyy leaves traces of previous plots, David Bateman, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, John W. Eaton, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, David Bateman, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, Shai Ayal, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, Ben Abbott, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, John W. Eaton, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, Ben Abbott, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, David Bateman, 2008/03/31
- Re: [Changeset] plotyy leaves traces of previous plots, John W. Eaton, 2008/03/31