Dealing with Multiple figures

Hi All,
I have multiple figures set up at the start of my code. through out the script I add data to the plots and at the end I would like to set all the figure parameters, like xlim, ylim, legend etc. But I can not figure out how to do it. Eample code

fig1 = plt.figure(1)
ax1 = fig1.add_subplot(111)

fig2 = plt.figure(2)
ax2 = fig2.add_subplot(111)

fig3 = plt.figure(3)
ax3 = fig3.add_subplot(111)

ax1.plot(...)
ax2.plot(...)
ax3.plot(...)

ax1.plot(...)
ax2.plot(...)
ax3.plot(...)

# set the x and y lim <- how do I do this?

plt.show()

Thanks

ax1.set_xlim(xmin, xmax)
ax1.set_ylim(ymin, ymax)
...

Ryan

ยทยทยท

On Fri, Nov 5, 2010 at 7:12 AM, John M. Densmore (Cont, ARL/WMRD) <john.m.densmore@...1783...> wrote:

Hi All,
I have multiple figures set up at the start of my code. through out the
script I add data to the plots and at the end I would like to set all
the figure parameters, like xlim, ylim, legend etc. But I can not figure
out how to do it. Eample code

fig1 = plt.figure(1)
ax1 = fig1.add_subplot(111)

fig2 = plt.figure(2)
ax2 = fig2.add_subplot(111)

fig3 = plt.figure(3)
ax3 = fig3.add_subplot(111)

ax1.plot(...)
ax2.plot(...)
ax3.plot(...)

ax1.plot(...)
ax2.plot(...)
ax3.plot(...)

# set the x and y lim <- how do I do this?

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma