[Changeset] plotyy leaves traces of previous plots
Bateman David-ADB014
David.Bateman at motorola.com
Fri Mar 28 15:00:04 CDT 2008
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?
Regards
David
-----Original Message-----
From: John W. Eaton [mailto:jwe at bevo.che.wisc.edu]
Sent: Fri 28-Mar-08 8:27 PM
To: Bateman David-ADB014
Cc: John W. Eaton
Subject: Re: [Changeset] plotyy leaves traces of previous plots
On 28-Mar-2008, David Bateman wrote:
| John W. Eaton wrote:
| > Try this:
| >
| > x = 0:0.1:2*pi;
| > y2 = sin (x);
| > y1 = exp (x - 1);
| > ax = plotyy (x, y1, x - 1, y2, @semilogy, @plot);
| > pause
| > plot (1:10)
| >
| > I expect it to plot the yy plot then create a new plot for the
| > plot(1:10) call. That's what happens in Matlab, and is waht I would
| > expect given that plot is a high level plotting function that calls
| > newplot. But Octave puts the 1:10 line on top of the with new axes.
| > I don't understand why. Is newplot not doing the right thing in this
| > case? Calling clf before plot(1:10) does what I expect, but it
| > shouldn't be necessary to do that.
| >
| >
|
| Humm, ok.. I agree that newplot is doing the wrong thing in this case..
| The case above is treated by newplot in the same manner it treats a
| subplot. That is it clears only the last subplot.. However, how to we
| get newplot to recognize the difference between a subplot and a plotyy
| plot? In __go_draw_axes__.m we rely on the fact that the
| activepositionproperty is "position" for the plotyy plots to identify
| this case.. We can do the same in newplot. However what is the correct
| treatment of the axes in a plotyy plot? Is something like the attached
| the "right" solution?
I'm not sure. Will you please post this to the maintainers list?
Maybe Michael or Shai will have some insight about how newplot is
supposed to work. Is it possible that the "nextplot" property is not
being set correctly somewhere? Is it really necessary to have a
special case based on the "activeposition" property, or is that just a
kluge that will only work properly with gnuplot?
jwe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080328/3b7444c0/attachment.html
More information about the Octave-maintainers
mailing list