[OctDev] patch for plotyy.m

Søren Hauberg soren at hauberg.org
Sat Jun 13 15:31:34 CDT 2009


fre, 12 06 2009 kl. 04:28 -0700, skrev Eric Chassande-Mottin:
> 
> plotyy.m is not robust. an error occurs depending 
> on figure with axes is already opened or not.
> here is a patch that should solve the problem.

The 'plotyy' function is part of Octave, so bugs should be reported to
bug at octave.org -- I've forwarded your mail to this list.

Søren
> 
> *** old/plotyy.m	2009-06-12 13:25:50.000000000 +0200
> --- new/plotyy.m	2009-06-12 13:25:11.000000000 +0200
> ***************
> *** 72,82 ****
>       endif
>     else
>       f = get (0, "currentfigure");
> !     if (isempty (f))
>         ax(1) = axes ();
>         ax(2) = axes ();
>       else
> -       ax = get (f, "children");
>         for i = 3 : length (ax)
>   	delete (ax (i));
>         endfor
> --- 72,85 ----
>       endif
>     else
>       f = get (0, "currentfigure");
> !     if isempty(f)
> !       figure;
> !     endif
> !     ax = get (f, "children");
> !     if length(ax) < 2
>         ax(1) = axes ();
>         ax(2) = axes ();
>       else
>         for i = 3 : length (ax)
>   	delete (ax (i));
>         endfor
> 



More information about the Bug-octave mailing list