The recent version of the mpl now supports multi-column legend.
http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo3.html
Thus, it would be great if you to try the new version, and if your
problem is still not solved, please report it again.
Regards,
-JJ
On Sun, Apr 12, 2009
Jae-Joon hi,
I am a newbie with matplolib. I need a horizontal legend because my
figures are pretty wide and I need to automate the process of generating it.
Since matplotlib does not support horizontal legends I am hacking around it.
I modified your example below. So the following works:
Although I think it is possible to calculate the bounding box of the
all legends automatically,
Here is a manual way.
from matplotlib.patches import Rectangle
l1.get_frame().set_visible(False) # make background frame of legends invisible
l2.get_frame().set_visible(False)
# make a large backgrou
Hello,
Em Thursday 09 October 2008 13:46:52 Jae-Joon Lee escreveu:
> Meanwhile, you may try to make multiple legends as a posible workarounds.
Thanks for your answer. That did the trick, and the figure
looks more or less as I wanted. It would look exactly as I
wanted if I could remove the border
The current legend class does not support multiple columns.
Eric Wertman once mentioned in this list that he would work on this
feature, but I don't know the current status.
A (partial) rewrite of the legend class which I plan to support
multicolumns is in my TODO list but I haven't started it yet.
Hello,
Is there an easy way to make a legend with multiple lines
and columns? I need 8 plots in the same figure, and the
legend takes a lot of space. I believe that if I could
orient the legend in multiple lines and columns (say, 2
lines with four columns each), I could save a lot of
space, giving