legend plots wrong way round

Ben Abbott bpabbott at mac.com
Mon Nov 24 16:12:08 CST 2008


On Monday, November 24, 2008, at 12:46PM, "Ben Abbott" <bpabbott at mac.com> wrote:
>On Monday, November 24, 2008, at 08:06AM, "Ben Abbott" <bpabbott at mac.com> wrote:
>>
>>On Nov 18, 2008, at 10:09 AM, Tobias Kerzenmacher wrote:
>>
>>> Hello,
>>> In the development release of octave the legend is the wrong way  
>>> round compared to octave 3.0.1:
>>> If I plot symbol 1, 2, 3 and 4 (eg.  
>>> plot(x1,y1,symbol1,x2,y2,symbol2,... etc)
>>> and do a
>>> legend('1','2','3','4')
>>> then symbol 1 corresponds to '4'
>>> symbol 2 to '3'
>>> symbol 3 to '2'
>>> and symbol 4 to '1'
>>> Tobias
>>
>>This is likely due to a change in the ordering of the handles for  
>>children.
>>
>>I can look into this later, but I'm presently off to work. So if  
>>anyone is inclined please take care of it.
>>
>>Ben
>>
>
>It appears that there are two things needed to be fixed. In legend.m the attached changeset associates the legend labels with the proper objects (it could use more testing to be sure all works with hggroups). Unfortunately, the rendered legend lists the objects in the reverse order of what is desired.
>
>It appears to me that to correct the order of the legend labels the order of rendering of the axes' children in __go_draw_axes__ must be reversed. 
>
>John/David/anyone-else is this the proper thing to do?
>
>Ben

Combined with the attached changeset the legend works for me.

Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-__go_draw_axes__.patch
Type: application/octet-stream
Size: 1072 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081124/6eb94b2f/attachment.obj 


More information about the Octave-maintainers mailing list