You need to add the patch to the second axes.
patch = ConnectionPatch((.5, .5), (.7, .3), 'data', 'data',
axesA=ax1, axesB=ax2,
zorder=100, arrowstyle='fancy',
connectionstyle='Angle3',
mutation_scale=10)
ax2.add_patch(patch)
However, this does not work right out of the box currently (which
should be bug).
As a workaround, add a following line and it will work.
patch.set_annotation_clip(False)
It would be appreciated if you file a bug report for a future reference.
http://sourceforge.net/tracker/?atid=560720group_id=80706func=browse
Regards,
-JJ
On Thu, Dec 3, 2009 at 9:31 AM, Stephane Raynaud
stephane.rayn...@gmail.com wrote:
Hi,
how to make this arrow not disappear below the right plot?
Here is the code :
from matplotlib.patches import *
import matplotlib.pyplot as P
P.figure(figsize=(5, 3))
ax1 = P.subplot(121)
P.plot([0, 1])
ax2 = P.subplot(122)
P.plot([0, 1])
patch = ConnectionPatch((.5, .5), (.7, .3), 'data', 'data', axesA=ax1,
axesB=ax2,
zorder=100, arrowstyle='fancy',clip_on=False, connectionstyle='Angle3',
mutation_scale=100)
ax1.add_patch(patch)
P.savefig('cross_arrow.png')
P.show()
--
Stephane Raynaud
--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users