On Thursday, 12 July 2007, Mark Bakker wrote:
> Hello, I never noticed the 'annotate' option in pylab.
> I have been trying unsuccesfully to get it to work.
> I am working in interactive mode and get the following error.
> Thanks for any help, Mark
>
> >>> plot([1,2,3])
> >>>
> >>> annotate( 'Mark', (1,2), (1,2.5) )

Use
>>> annotate( 'Mark', xy=(1,2), xytext=(1,2.5) )

You can set the arrow properties with the arrowprops dict as kwarg, 
e.g.

>>> annotate( 'Mark', xy=(1.,2.), xytext=(0.5,2.5), \ 
arrowprops=dict(width=1, frac=0.1, headwidth=5, facecolor='black') )

Johann

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to