|
From: John H. <jd...@gm...> - 2008-09-25 13:08:47
|
On Thu, Sep 25, 2008 at 6:34 AM, Peter Saffrey <pz...@dc...> 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() 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 |