overplot while keeping the axes fixed

ZuYing zuying at gmail.com
Fri Jan 14 02:04:31 EST 2011


Hi folks,

I was trying to split the frame into 2 panels using "subplot",

fig = matplotlib.pyplot.figure()
plt1 = fig.add_subplot(2,1,1 )
plt2 = fig.add_subplot(2,1,2 )
plt1.plot(x1, y1, 'g-')
plt2.plot(x2, y2, 'g-')



then I need to overplot other curves on each subplot panel using the
same axes/ticksize settings, although the new data points extend a
longer x-range

plt1.plot(x3, y3, 'g-') will simply overplot the new x3/y3 by
extending the x-axis, is there a simply option or way to hold the axes/
ticksize setting fixed while doing overplot? I am writing a pipeline
to analyze thousands of sets of data points, so a tunning on the
pyplot would be a lot more preferred than finding the xrange
individually for each data sets. Thanks!



More information about the Python-list mailing list