octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: legend and bar?


From: David Bateman
Subject: Re: legend and bar?
Date: Mon, 05 Nov 2007 16:29:46 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Peter A. Gustafson wrote:
> 2.9.16+
>
> It appears that bar and legend don't play nicely together.  Since there
> is no keylabel field in a bar plot, I assume it isn't implemented due to
> the recent addition of patch objects.
>
> I suppose this may be a bit difficult, as it would seem several
> keylabels might need to be available to the same patch object.  For
> example, the following appears as one patch object.
>
> x=0:5;
> h=bar(x,[x]'*[1 2])
> legend('test1','test2')
> get(h)
>
> Will it be possible to assign two labels to a single patch object?  Thanks,
>
> Pete
>
>
>   
Matlab has the "DisplayName" field of the BarSeries objects that
includes the values of the legend strings.. I suppose we might add a
"KeyLabel" field to the patch objects as you suggest, though it probably
makes more sense to just bite the bullet and implement the bar series
objects in a matlab compatible way. JHandles in octave-forge has this
but its in a mix of java and m-files... If this was in pure m-file it
would be relatively easy to migrate this into Octave, and add legends
for bar plots in the process.

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]