Logo Search packages:      
Sourcecode: matplotlib version File versions

multicursor.py

from matplotlib.widgets import MultiCursor
from pylab import figure, show, pi, arange, sin

t = arange(0.0, 2.0, 0.01)
s1 = sin(2*pi*t)
s2 = sin(4*pi*t)
fig = figure()
ax1 = fig.add_subplot(211)
ax1.plot(t, s1)


ax2 = fig.add_subplot(212, sharex=ax1)
ax2.plot(t, s2)

multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1)
show()

Generated by  Doxygen 1.6.0   Back to index