[Changeset] plotyy leaves traces of previous plots
John W. Eaton
jwe at bevo.che.wisc.edu
Fri Mar 28 12:07:54 CDT 2008
On 27-Mar-2008, David Bateman wrote:
| The plotyy function leaves traces of previous plots when called in
| succession as the treatment of the axes handle doesn't taken into
| account that in the case of plotyy it is a two element vector, and so
| mistreats passing the handle to the function and setting the axis handle
| for the second plot misses the call to newplot().
|
| The issue can be seen with an example
|
| x=[1:10];
| y=rand(size(x));
| z=rand(size(x))*10;
| plotyy(x,y,x,z);
| pause
| q=rand(size(x))*100;
| plotyy(x,y,x,q);
|
| The attached changeset address this.
I applied it.
| There is however another issue in
| gnuplot revealed by this in that the call to "unset ytics" passed to
| gnuplot for the case of plotyy doesn't remove the mirrored ticks. This
| is a minor annoyance but doesn't seem to be Octave's fault.
Omitting the "unset ytics" that is passed for the second plot seems to
avoid the problem, but I don't see how to decide when it should be
omitted given the information available in __go_draw_axes__.m,
Also, I just noticed that calling plot immediately after plotyy
results in a plot overlaying the graph generated by plotyy. I don't
understand why that happens.
jwe
More information about the Bug-octave
mailing list