For me, the code below draws the top plot only half on the page. Can anybody help me out?
from pylab import *
groups = [ [ 'A', 'B', 'C', 'D', 'E' ],
[ 'F', 'G', 'H', 'I' ],
[ 'M', 'N', 'O', 'P', 'Q' ] ]
f = figure(1)
for i in range(len(groups)):
group = groups[i]
subplot(len(groups), 1, i)
for treatment in group:
plot(linspace(0, 1, 32), rand(32))
show()
Thanks,
Peter
subplot indexing starts at 1 and not zero, which is a matlab
compatibility feature, so perhaps
subplot(len(groups), 1, i+1)
does what you want
JDH
···
On Thu, Sep 25, 2008 at 6:34 AM, Peter Saffrey <pzs@...2149...> wrote:
For me, the code below draws the top plot only half on the page. Can
anybody help me out?
from pylab import *
groups = [ [ 'A', 'B', 'C', 'D', 'E' ],
[ 'F', 'G', 'H', 'I' ],
[ 'M', 'N', 'O', 'P', 'Q' ] ]
f = figure(1)
for i in range(len(groups)):
group = groups[i]
subplot(len(groups), 1, i)
for treatment in group:
plot(linspace(0, 1, 32), rand(32))
show()