Hi Chris,

sorry I don't understand what you are exactly looking for. Maybe you could 
explain it once more. 
In general I think all one can do is to play around with the parameters 
in 'subplots_adjust' and the location in 'legend' to get the best result. 
I'm not an expert but I think there's no default behaviour covering all needs 
(outside the axes and best located), because for example the legend width is 
influenced by the length of the labels.

much effort and best regards
Matthias 

On Monday 17 March 2008 17:13, Chris Withers wrote:
> Hi Matthias,
>
> Matthias Michler wrote:
> > I'm not sure if there was an example in matplotlib, but the following
> > works for me:
> > ---------------------------------------------------------------------
> > from pylab import *
> > figure()
> > subplot(111)
> > subplots_adjust(right=0.7)
> > plot(arange(10), label='linear')
> > plot(arange(10)**2, label='quadratic')
> > legend(loc=(1.1,0.5))
> > show()
> > ------------------------------------------------------------------------
>
> Thanks for this. This is exactly what I was after except that the legend
>   now appears about 25% off the right hand of the screen or whatever I
> save the figure to.
>
> How can I have the legend as placed above but with the whole of it showing?
>
> cheers,
>
> Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to