On Mon, Mar 7, 2011 at 5:05 AM, Andrea Crotti <andrea.crott...@gmail.com>wrote:

> Here I am again with the text boxing and scaling.
> I'm having some troubles to understand the whole picture, since it seems
> that there are so many actors involved.
>
> So suppose I have some text and I want to see how big it is, I thought
> I could
>
> t = matplotlib.text.Text(0, 0, "very long string")
> t.get_bbox_patch()
>
> to get the size and then do the rest.
>
> but this still returns None, probably because at this point there's
> probably something still missing, right?
>
>
The thing that is missing is that it hasn't been drawn yet.  This is why
matplotlib can not act like LaTeX and figure out optimal layouts for you
automatically.  The bbox for any text object can not be known until draw
time.


> And when I get the resulting size, how do I make my axes big enough
> anyway?
>
>
You can use subplots_adjust() to change the spacing between subplots.  There
should also be a way to change the figure size as well through the figure
object.



> What's the relation between size and axes for example?
>

I am not sure I understand your question.

Ben Root
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to