I would like to annotate 2 points with the same annotation and I would like to have 2 arrows pointing from that 1 annotation to the points.
I have the following code:
import matplotlib.pyplot as plt
plt.plot( [1,2], [1,2], 'o' )
plt.xlim( [0,3] )
plt.ylim( [0,3] )
plt.annotate( 'Yet another annotation', xy=(1,1),
xytext=(1.5, .5),
arrowprops=dict( arrowstyle="->" )
)
plt.annotate( 'Yet another annotation', xy=(2,2),
xytext=(1.5, .5),
arrowprops=dict( arrowstyle="->" )
)
plt.show()
As you can see in the resulting figure, it works (although it might not be the most elegant way since I have two annotations at the exact same location).
I am, however, unhappy with that: I would like to let the arrows start at the exact same position, currently they seem to start from the center of the annotation, I would prefer to let them start from somewhere at the edge of the annotation so that their starting points connect.
How do I achieve that?