[OctDev] patch for plotyy.m

Ben Abbott bpabbott at mac.com
Sun Jun 14 15:15:29 CDT 2009


On Jun 13, 2009, at 4:31 PM, Søren Hauberg wrote:

> 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

I just pushed a changeset attributed to Eric.

	http://hg.savannah.gnu.org/hgweb/octave/rev/d50c3d8efe71

Ben


More information about the Bug-octave mailing list