Many thanks Tinne.

That did it.




On Thu, Aug 26, 2010 at 03:55, Tinne De Laet
<tinne.del...@mech.kuleuven.be> wrote:
> Hi Carlos,
>
> On Thu, Aug 26, 2010 at 04:49, Carlos Grohmann
> <carlos.grohm...@gmail.com> wrote:
>> Hello all,
>>
>> Is there a way to tell MPL that something I plotted (like a series of
>> Line2D, to create a grid) should not be considered for the legend?
>>
>> I'm plotting a lot of things, and because of these objects (without
>> label), I always got these msgs:
>>
>> /usr/lib/pymodules/python2.6/matplotlib/axes.py:4014: UserWarning: No
>> labeled objects found. Use label='...' kwarg on individual plots.
>>  warnings.warn("No labeled objects found.  "
>>
> I always use the following set of commands to get costumize my legend:
>
> **************************************
> legendEntries=[]             # list of plots that are going to be in
> the legend
> legendText=[]   # list of text messages for the legend
>
> thisPlot = plot(x,y,'b*') # a plot command
>
> legendEntries.append(thisPlot) # only do this for the plots you want
> to add to the legend
> legendText.append("legend text")    # only this for the plots you want
> to add to the legend
>
>  lgd = legend(legendEntries,legendText,numpoints=1,prop=props,loc='upper
> right') # example of how to draw the legend
>
> **************************************
>
> Hope this helps,
>
> Tinne
>



-- 
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano
http://lattes.cnpq.br/5846052449613692
Linux User #89721
________________
Can’t stop the signal.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to