Johann Rohwer wrote:
> 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) )

That is a good workaround, but Mark has correctly identified a bug.  It 
should not be necessary to use kwargs for these. It looks like the pylab 
and axes.py interfaces to the text class Annotate have not kept up with 
the latter, so docstrings and kwargs are out of sync and mismatched.

I can clean this up some time this week.

Eric

> 
> 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