Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bf3220

Browse files
author
James Evans
committed
Updated to demonstrate 'offset points'
svn path=/trunk/matplotlib/; revision=4644
1 parent a68ade8 commit 8bf3220

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

examples/annotation_demo.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555

5656
ax.annotate('points', xy=(100, 300), xycoords='figure points')
5757

58+
ax.annotate('offset', xy=(1, 1), xycoords='data',
59+
xytext=(-15, 10), textcoords='offset points',
60+
arrowprops=dict(facecolor='black', shrink=0.05),
61+
horizontalalignment='right', verticalalignment='bottom',
62+
)
63+
5864
ax.annotate('local max', xy=(3, 1), xycoords='data',
5965
xytext=(0.8, 0.95), textcoords='axes fraction',
6066
arrowprops=dict(facecolor='black', shrink=0.05),

0 commit comments

Comments
 (0)