etc for producing images at various scales)
Paul Ivanov, on 2011-01-21 15:20, wrote:
I'm almost certain that one *can* write a function to do this
pro grammatically (without having to hand tweak anything), by
looking at say, the .get_window_extent() but I haven't found the
time to scratch that itch, yet.
If someone wants to beat me to it, here's the sort of thing that
you can do:
" adjust subplot parameters to fit the yaxis label"
f = ax.figure
textwidth = ax.yaxis.get_label().get_window_extent().width
labelwidth = max([lab.get_window_extent().width for lab in ax.get_yticklabels()])
# the 3 *ax.yaxis.labelpad is just a fudge factor for now, need
# to look into the sourcecode to figure out what the
# appropriate placement is normally, to know how to adjust
I should add that along with doing a similar thing for the xaxis,
this would need to be extended for the multiple subplot case, to
also adjust the wspace and hspace parameters accordingly.
this is important functionality currently missing from matplotlib
out-of-the-box at the moment, so I'll try my crack at it this out
CCing the devel list in case someone has more opinions.
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7