2011/3/7 Andrea Crotti <andrea.crott...@gmail.com>:
> [...]
> 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?
>
> And when I get the resulting size, how do I make my axes big enough
> anyway?

As Ben explained you need to draw first. So the usual path is:
1. Draw
2. Figure out the size of potentially problematic things (labels,
titles...) and the space you need.
3. Adjust subplots or whatever needs adjustment to fit.
4. Draw again.

Sort of weird but it works and I think it's widely used.

Goyo

------------------------------------------------------------------------------
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