Proposed Submission: Figure Layout Management

I've been playing with matplotlib a couple of weeks now. That nasty memory leak was starting to turn me off, and then got fixed right on cue! I've had a hell of a time finding a good plotting system to replace BLT, so that was a relief.

Anyhow, I noticed my titles overwriting the x axes of adjacent subplots, and so I wrote a little function that shifts subplots around. That's not terribly interesting, but I have a compulsive habit of making everything I do as general as possible. The result is a system for controlling figure layout based on six parameters, three for each axis. As well as a rather elaborate demo. The basic demo was done in an hour, but I couldn't leave well enough alone!

I tried to get the docstrings right, but haven't checked them. I also included a mathematical derivation at the end of the file, and I don't know what the documentation scripts will make of that.

There's no error checking. None should be needed, as long as all the parameters are numeric. Some curious results are very possible, but nothing breaks.

If you find the documentation and API (and whatever else) worthy, you can include it in the next release/current CVS if you think it appropriate.

Oh, and if the user wants to shift individual subplots around, that function is still present.

Chris Fuller (5.32 KB) (4.17 KB)