2011/2/18 Benjamin Root <ben.r...@ou.edu>:
>
>
> 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 full control over all placement,
> and merely establish good defaults.
>
> Just for completeness, I like this page because it talks about the multiple
> different ways you can specify coordinates for a text object (and
> corresponding arrow) for placement:
>
> http://matplotlib.sourceforge.net/users/annotations.html
>
> Knowing ahead of time how much space an annotation will take is very
> difficult, especially if your text involves any LaTeX symbols.  However, it
> is possible.  The Text object has some method calls that can return bounding
> boxes for the text object after it is made:
>
> http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.text.Text.get_bbox_patch
> http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.text.Text.get_window_extent
>
> I haven't used these myself, so I don't know exactly what is the difference
> between them (I think they are different coordinate systems).  Once knowing
> the size of your text object, you can change the position of the object
> using its set_position() method.  It is tricky, but if positioning and
> layout is very important to you, it is possible to do.
>
> I hope this helps!
>
> Ben Root
>

Thanks for the answer, I tried something out but well it's not so trivial.
And I think it doesn't make much sense to add the text inside the same
plot, so I thought about subplot.

I want a bigger subplot on top and one are splitted in two parts below it.

But if I do
subplot(221)
...
subplot(222)
...
subplot(223)
...
it doesn't like it, and I didn't find any example which has this "more
advanced" subplotting.

Once that works it might be easier to compute the size that I need
since the coordinate for the subplot are always from 0 to 1...

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to