Patch for having legends outside right of plot

Oh, and please bear with me, this is the first time I've

    > contributed a meaningful patch to an open source project.

Are you aware of Figure.legend, which is designed to do what you
describe (place a legend outside the axes). See also
examples/figlegend_demo.py. I don't think your patch made it through
(at least I couldn't read it) but if there are extra features you need
(like auto-resizing the axes) I think these will be best placed in
Figure.legend.

  http://matplotlib.sourceforge.net/matplotlib.figure.html#Figure-legend

Thanks!
JDH

On Thursday 06 October 2005 23:52, you pondered:

Are you aware of Figure.legend, which is designed to do what you
describe (place a legend outside the axes).

Hmm, I must admit I knew nothing about figures when I posted. But now that
I've done some homework, I see that using Figure.legend is suboptimal as well
because it can neither resize the axes accordingly nor place outside legends
for each subplot automatically.

See also
examples/figlegend_demo.py. I don't think your patch made it through
(at least I couldn't read it) but if there are extra features you need
(like auto-resizing the axes) I think these will be best placed in
Figure.legend.

Somehow my patch got truncated. Here it is again. I still think that
legends.py is the place to have the resizing code as in this way you can do
it with arbitrary number of subplots & layouts. In figure.py I would imagine
this to be difficult with arbitrary number of axes.

Oh, by the way there was a request sometime ago for an automated way to place
legends outside:

http://sourceforge.net/mailarchive/message.php?msg_id=11106725

Have a look at the patch and tell me what you think.

matplotlib-0.84-outside_legend-02.patch (4.54 KB)

···

--
Kilian Hagemann

Climate Systems Analysis Group
University of Cape Town
Republic of South Africa
Tel(w): ++27 21 650 2748