Re: [Matplotlib-users] Text box adaptable

2011-03-08 Thread Benjamin Root
On Tue, Mar 8, 2011 at 4:51 AM, Andrea Crotti wrote: > Goyo writes: > > > > > 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

Re: [Matplotlib-users] Text box adaptable

2011-03-08 Thread Mike Kaufman
Is there an easy way to draw a piece of text (or whatever) to an off-screen or off-canvas buffer, figure out the size from that, and then use that to draw to the plot? M On 3/8/11 5:51 AM, Andrea Crotti wrote: > Goyo writes: > >> >> As Ben explained you need to draw first. So the usual path is

Re: [Matplotlib-users] Text box adaptable

2011-03-08 Thread Andrea Crotti
Goyo writes: > > 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 wo

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Goyo
2011/3/7 Andrea Crotti : > [...] > 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 si

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 5:05 AM, Andrea Crotti 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 >

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Andrea Crotti
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.ge

Re: [Matplotlib-users] Text box adaptable

2011-02-27 Thread Benjamin Root
On Sun, Feb 27, 2011 at 6:48 AM, andrea crotti wrote: > 2011/2/18 Benjamin Root : > > > > > > Automatic layouts are difficult to do in matplotlib. This was a design > > decision trade-off made early in its development. Instead of having > > matplotlib determining optimal layouts and such, the de

Re: [Matplotlib-users] Text box adaptable

2011-02-27 Thread andrea crotti
2011/2/18 Benjamin Root : > > > Automatic layouts are difficult to do in matplotlib.  This was a design > decision trade-off made early in its development.  Instead of having > matplotlib determining optimal layouts and such, the developers decided that > it would be better to give the programmers

Re: [Matplotlib-users] Text box adaptable

2011-02-18 Thread Benjamin Root
On Fri, Feb 18, 2011 at 2:41 AM, andrea crotti wrote: > Hi everyone, and thanks for the amazing library first of all :) > > Now a short question, I have some graphs and I would like to add some > statistical summary as text on the figure. > > I see how I can add text and it's quite easy, the prob

[Matplotlib-users] Text box adaptable

2011-02-18 Thread andrea crotti
Hi everyone, and thanks for the amazing library first of all :) Now a short question, I have some graphs and I would like to add some statistical summary as text on the figure. I see how I can add text and it's quite easy, the problem is that the text wants a coordinate to write the graph. And