On 9/29/10 12:49 PM, Justin McCann wrote:
> Not to pile on the "auto-adjust to make labels fit" bandwagon, but
> I've been following the FAQ on adjusting the subplot locations to make
> room for too-long tick labels:
>
>     
> http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
>
> and have found that the FAQ code isn't very robust.
>
> For example, if I interactively change the size of the plotting window
> so the ylabels touch the left hand side of the window, stretching it
> right again pushes the labels and the subplots too far to the right
> (see attached 'auto_subplot_adjust.toofar.png').
>
> If I make the window too narrow so the figure itself shrinks too much,
> it starts to raise 'ValueError: left cannot be>= right' exceptions,
> and then really shrinks the plot even more (see attached
> 'auto_subplot_adjust.leftright.png').
>
> Any suggestions for making this more robust?

I made the FAQ entry code a little more general (and hopefully more 
robust) a while ago.  I don't know if it takes care of the problem 
you're talking about, though.

I posted it to the matplotlib-devel mailing list here:

http://www.mail-archive.com/matplotlib-de...@lists.sourceforge.net/msg05628.html

You're welcome to use it, and if it makes more sense than the FAQ entry, 
whoever does the FAQ is welcome to include it in the FAQ.

Jason

--
Jason Grout

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to