John and Sandro, I just had a quick look at the patch. The patch is for older version of the mpl, and I couldn't test it yet. Anyhow, it should be straight forward to port it to the new legend class. I'll work on it.
Meanwhile, below is a little code one may use to put the legend title w/o modifying the mpl. -JJ plot([1,2,3]) plot([2,1,3]) legend(["test", "test2"]) fig = gcf() ax = gca() from matplotlib.offsetbox import TextArea, VPacker mylegend=ax.get_legend() legendtitle=TextArea( "Legend Title", textprops=dict(size=20)) mylegend._legend_box = VPacker(pad=5, sep=0, children=[legendtitle, mylegend._legend_box], align="center") mylegend._legend_box.set_figure(fig) draw() On Fri, Feb 13, 2009 at 7:20 AM, John Hunter <jdh2...@gmail.com> wrote: > On Fri, Feb 13, 2009 at 3:31 AM, Sandro Tosi <mo...@debian.org> wrote: >> Hello, >> a friend point me to [1] asking if there's a way to add a title to >> legend without applying this patch. Well, my answer was "not that I >> know of" then I start wondering if there's a reason this patch was not >> applied and there's a plan to do it anytime soon. >> >> [1] >> http://www.mail-archive.com/matplotlib-users%40lists.sourceforge.net/msg05678.html > > Jae Joon -- will you review this and apply it if it looks like a good > addition to you > > Thanks, > JDH > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel