Patch for having legends outside right of plot

Cool, I've rewritten my code with the suggested

    > simplification and style concerns you put forward.


    > tarball, but I guess using CVS is safer. Now, being a
    > newbie to open source *developing* and CVS, how do I
    > access and use mpl's CVS repository? Do you prefer my
    > patches to be sent to this list or should I commit my
    > changes to cvs?

See matplotlib download | You should upload
your patches to the sourceforge patch system

  matplotlib download |

and send a notice to this list describing what is in them. After
you've gone through this a number of times and have a clear
understanding of matplotlib internals etc I can add you to the
developers list if that is preferable.

    > So, I thought just retrieve the dimensions of the current
    > subplot somehow, but to no avail. Is there a way to
    > retrieve the dimensions and/or position of the subplot,
    > not the axes it contains? Something like lbwh=(0,0,0.5,1)
    > for row 1, col 1 and lbwh=(0.5,0,0.5,1) for row 1, col 2
    > in the above example? That way I'd be able to calculate
    > how much space axes + outside legend is supposed to occupy
    > (my spaceNeeded variable).

    > Also, I see that this will only work when subplots are
    > used, as soon as custom axes positioning/sizing is used
    > such as that in examples/, there seems to
    > be no way to calculate this required space. Any way to
    > check for this? Or should we leave it up to the user to
    > turn resizing off if it doesn't give the desired results?

From any Axes instance, you can get the position info with

l,b,w,h = ax.get_position()

Take a look at fig.colorbar to see how it does it -- it looks like the
same idea.