Bug in plotting - 3.0.4 RC1

Ben Abbott bpabbott at mac.com
Wed Jan 21 10:12:57 CST 2009


On Wednesday, January 21, 2009, at 09:16AM, "Marco Caliari" <marco.caliari at univr.it> wrote:
>>>>> x = linspace(0,10,11);
>>>>> y = x+1;
>>>>> plot(x,y,x,y)
>>>>> xlabel('x')
>>>>> ylabel('y')
>>>>> 
>>>>> produces the following
>>>>> 
>>>>> error: __go_draw_axes__: unknown object class, root figure
>>>>> error: evaluating switch command near line 332, column 7
>>>>> error: evaluating for command near line 328, column 5
>>>>> error: evaluating if command near line 25, column 3
>>>>> error: called from `__go_draw_axes__' in file
>>>>> `/usr/local/share/octave/3.0.4/m/plot/__go_draw_axes__.m'
>>>>> error: evaluating switch command near line 58, column 4
>>>>> error: evaluating for command near line 56, column 2
>>>>> error: evaluating if command near line 33, column 7
>>>>> error: evaluating if command near line 26, column 5
>>>>> error: evaluating if command near line 25, column 3
>>>>> error: called from `__go_draw_figure__' in file
>>>>> `/usr/local/share/octave/3.0.4/m/plot/__go_draw_figure__.m'
>>>>> error: evaluating if command near line 81, column 6
>>>>> error: evaluating if command near line 78, column 4
>>>>> error: evaluating if command near line 76, column 2
>>>>> error: evaluating for command near line 75, column 7
>>>>> error: evaluating if command near line 45, column 5
>>>>> error: called from `drawnow' in file
>>>>> `/usr/local/share/octave/3.0.4/m/plot/drawnow.m'
>>>>> 
>>>>> I'm using Octave-3.0.4 RC1
>>>>> 
>>>>> No problem with Octave-3.0.3.
>>>>> 
>>>>> Best regards,
>>>>> 
>>>>> Marco
>>>> 
>>>> 
>>>> I fixed the problem changing back
>>>>
>>>>    Matrix new_kids (n-1, 1);
>>>> 
>>>> to
>>>>
>>>>   Matrix new_kids (1, n-1);
>>>> 
>>>> as it was in octave-3.0.3/src/graphics.cc
>>> 
>>> Not sure it is the right fix. In fact, now there is a problem with the
>>> order of the legends, which can be fixed changing back
>>>
>>>   for i = nargs:-1:1
>>> 
>>> to
>>>
>>>   for i = 1:nargs
>>> 
>>> as it was in octave-3.0.3/scripts/plot/legend.m
>>> 
>>> Marco
>>
>> Regard this problem, it originated due to children having a reverse order as 
>> compared to the commercial variant. The last change you made should reverse 
>> the order of the legend, which is not correct (1st line at the bottom and 
>> last at the top). Can you confirm?
>
>Suppose you have legend('a','b'): WITH the last change I have 'a' at the 
>top and 'b' at the bottom. And, what is more important, the label 'a' 
>correctly refers to the first plot and 'b' to the second. WITHOUT the last 
>change I have 'a' at the bottom and 'b' at the top. But, the label 'a' 
>wrongly refers to the second plot and 'b' to the first.
>
>> Regarding your original error, "unknown object class, root figure", can 
>> you/someone confirm exactly where that occurs in __go_draw_axes__? (I don't 
>> have a copy of 3.0.4 available on my Mac).
>>
>> Browsing the sources, it looks like it is line 941/942 below
>
>Yes.
>
>> 314 switch (obj.type)
>> 315 case "image"
>> [...]
>> 940 otherwise
>> 941 error ("__go_draw_axes__: unknown object class, %s",
>> 942 obj.type);
>> 943 endswitch
>>
>> I recall the root object had been called "root_figure" in the recent past and 
>> had been changed to "root" in the 3.1+ branch.
>>
>> Can someone verify that get(0, "type") returns "root_figure" and not "root" 
>> for 3.0.4?
>
>If you mean get(0).type, I get
>
>ans = root figure
>
>Marco

ok. The 3.0.x branch needs to have the changeset below added.

http://www.nabble.com/Re%3A--changeset----have-closereq%28%29-respect-the-property-%22tag%22-p20073642.html

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






More information about the Bug-octave mailing list