formatting help with legend for stacked bar graph with many categories

Hello Users,

I need some help with formatting a legend for a stacked bar graph. Each bar is segmented into ~35 categories so my legend ends up being a long mess overlapping my plot. How can I position my legend outside of the plot and reduce the spacing and fontsize for the text?

Thanks,

  • Chuck

To change the legend font size, you may change the "legend.fontsize"
in rcParams.
The change will be global. If you want to change the font size of some
particular legend, use the appropriate font property as the "prop"
keyword.

http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=legend#matplotlib.pyplot.legend

List of spacing parameters are also available in the above
documentation. Most of other spacing parameters are meant to scale
with the font size.

For legend position, take a look at the below legend guide.

http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location

However, I guess this will only work if you use svn version.
If you're not using svn version, you can have similar result by
creating a separate axes.

http://www.nabble.com/Stopping-Legend-From-Overlapping-the-Graph-td24213554.html#a24213554

Regards,

-JJ

ยทยทยท

On Thu, Jul 16, 2009 at 7:15 PM, Chuck Pepe-Ranney<cpepera@...2681...> wrote:

Hello Users,

I need some help with formatting a legend for a stacked bar graph. Each bar
is segmented into ~35 categories so my legend ends up being a long mess
overlapping my plot. How can I position my legend outside of the plot and
reduce the spacing and fontsize for the text?

Thanks,

- Chuck

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options