With bbox parameter, you can draw a box (or a path) around a text. http://matplotlib.sourceforge.net/users/annotations_guide.html#annotating-with-text-with-box
There a several box styles, but unfortunately no circle. However, you can create a custom box style. http://matplotlib.sourceforge.net/users/annotations_guide.html#define-custom-boxstyle Attached is an modified example in the above link that draws a circle. IHTH, -JJ On Mon, Dec 27, 2010 at 6:27 AM, Nathann Cohen <nathann.co...@gmail.com> wrote: > Hello everybody !!! > > When adding some text to a plot, is there a way to know the actual > size of the letters as they appear, in such a way that I could, for > instance, draw a circle around a 'A', so that the A perfectly fits > inside ("the smallest circle containing the letter"), regardless of > the actual size of the picture I'm drawing ? > > Pray excuse me if my question has an obvious answer... I am working on > Sage's library (http://www.sagemath.org/) which uses Matplotlib... > This code is not very clear to me, not to mention it is my first > contact with Matplotlib... Thank you for your extreme patience :-) > > Nathann > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
boxstyle_circle.py
Description: Binary data
------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users