|
From: Ken M. <mc...@ii...> - 2006-04-17 14:38:27
|
Jakob,
Here's an example of managing axes, etc yourself while plotting.
John covered just about everything I was going to mention in his
email, but I'd like to add that using "from XYZ import *" in scripts
can make them hard for other people to understand.
Ken
import pylab
nrows = 2
ncols = 3
x = pylab.arange(0, 10, 0.1) # your X here
fig = pylab.figure()
for i in range(0, nrows*ncols):
y = i * x # your Y here
# i goes 0..N-1, but the plot number goes 0..N, so add one here
ax = fig.add_subplot(nrows, ncols, i+1)
ax.plot(x, y)
if ax.is_last_row():
ax.set_xlabel('time')
pylab.show()
|