From: Goyo <goy...@gm...> - 2011-03-07 21:44:06
|
2011/3/7 Andrea Crotti <and...@gm...>: > [...] > 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 |