figlegend and title

Hi,

I am just getting my feet wet with matplotlib.

I like plots with the legend outside the plotting area. I found the demo which uses figlegend (thanks Andrea), this fits the bill - at least I think so.

However I can't get this to work within the wxcursor_demo.py, is figlegend only available with "from pylab import *"?

The other question is can I have sub-title lines, I saw that I can pass newline with title string but this uses the same font attributes, I would like a slightly smaller font and non bold etc for the second title line.

Looked through the archive on gmane, but couldn't find anything.

Appreciate any pointers on this.

See you
Werner

Werner F. Bruhin wrote:

However I can't get this to work within the wxcursor_demo.py, is figlegend only available with "from pylab import *"?

I'm not sure about that one, but there are a number of convenience functions that are only in pylab. If so, you have two choices:

1) Use:
import pylab
pylab.figlegend(...)

2) you can look at the code in pylab.figlegend, and see what it does, and make your own version.

By the way, I'm on a quest to make the OO interface to matplotlib fully functional and convenient. If you want to work on it, John would probably except a patch to make a figure.legend() method.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

The part about the sub-title got over looked, so I'll post again - anyhow it was bad from me to stick two things into one message - sorry!

Is it possible to have sub-title lines, I saw that I can pass newline with title string but this uses the same font attributes, I would like a slightly smaller font and non bold etc for the second title line.

Thanks for any hints.
Werner

Hi All,

I figured this out, just doing something along these lines does the trick for me.

         self.figure.text(0.5, 0.95, title,
                horizontalalignment='center')
         self.figure.text(0.5, 0.92, 'sub title',
                horizontalalignment='center')

See you
Werner

Werner F. Bruhin wrote:

···

The part about the sub-title got over looked, so I'll post again - anyhow it was bad from me to stick two things into one message - sorry!

Is it possible to have sub-title lines, I saw that I can pass newline with title string but this uses the same font attributes, I would like a slightly smaller font and non bold etc for the second title line.

Thanks for any hints.
Werner

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click