trouble with plotyy

Ben Abbott bpabbott at mac.com
Tue Feb 17 08:14:53 CST 2009


On Feb 17, 2009, at 12:02 AM, John W. Eaton wrote:

> On 16-Feb-2009, Ben Abbott wrote:
>
> | On Mac OSX, and using Aquaterm, "rundemos plot" eventually fills my
> | screen with windows. I much prefer the way x11 works (i.e.  
> close(hfig)
> | actually closes the window, with aquaterm it remains visible, but  
> not
> | longer connected to gnuplot/octave).
> |
> | To relieve my minor frustration I greped the plot directory for  
> files
> | containing "%! close" and them replace "close" or "close all" with
> | "clf". The result was a non-functional demo.
> |
> | I've simplified the problem to a clf followee by a plotyy.
> |
> | clf
> | x = 0:0.1:2*pi;
> | y1 = sin (x);
> | y2 = exp (x - 1);
> | ax = plotyy (x, y1, x - 1, y2)
> |
> | which produces the error ...
> |
> | error: A(I): Index exceeds matrix dimension.
> | error: called from:
> | error:   /Users/bpabbott/Development/Octave_Toolbox/demos/plotyy.m  
> at
> | line 130, column 3
> | error:   /Users/bpabbott/Development/Octave_Toolbox/demos/plotyy.m  
> at
> | line 104, column 7
> |
> | The relevant part of ployy is below.
> |
> |   98   oldh = gca ();
> |   99   unwind_protect
> | 100     [ax, h1, h2] = __plotyy__ (ax, varargin{:});
> | 101   unwind_protect_cleanup
> | 102     ## Only change back to the old axis if we didn't delete it
> | 103     if (ishandle(oldh) && strcmp (get (oldh, "type"), "axes"))
> | 104       axes (oldh);
> | 105     endif
> | 106   end_unwind_protect
> |
> | I don't see anything to be concerned with here. Can someone verify
> | they see this as well?
> |
> | BTW, my sources are only a few hours old, and I did verify that my
> | change to the plotyy is unrelated to this feature.
>
> I checked in the following change.
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/a186c5b4f264
>
> Thanks,
>
> jwe

Works for me! Thanks

Ben




More information about the Octave-maintainers mailing list