Hi, JJ,

I wonder why the simple text command does not work for you? e.g.,
>
> def add_center_text(ax):
>    ax.text(0.5, 0.9075, "Centered Title", ha='center', va='center',
> fontsize=18,
>            bbox=dict(boxstyle='round, pad=0.5, rounding_size=0.25',
> fc="white",
>                      ec="k", lw=2),
>            transform=ax.transAxes)
>
>
The simple answer here is that I didn't understand what the transform
keyword argument was doing. I'm not entirely sure, still, but I gather it
has something to do with handling the changing of the axes coordinates.
 Man, I still have so much to learn about MPL....


Also, annotate command gives you more flexibility in text positioning.
>
> The axes location is supposed to be known during the drawing time. To
> get the axes position, you may do  something like
>
>   ax1._axes_locator(ax1, fig._cachedRenderer)
>
> Of course, this need to be done after the figure is properly drawn
> (e.g., after calling draw()) or during the drawing time.
>
>
Excellent. Thank you fot taking the time to explain how this works.
Although your first suggestion is what I need for the moment, I'm glad to
know how to get the axes positions, should I ever need them.


Thanks again!


Patrick
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to