overplot while keeping the axes fixed

Z

ZuYing

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top