|
From: Ryan K. <rya...@gm...> - 2006-04-17 14:03:56
|
I think you need to replace plot(x,y) with ax.plot(x,y).
I think this script could be slightly simpler if you used the pylab
interface to matplotlib so that you could just call figure, subplot,
and plot without having to specify the axis.
But if this is your first attempt at using matplotlib, you have done a
fairly impressive job at searching the examples and archives first.
Ryan
On 4/17/06, Jakob J. Lopez <jak...@gm...> wrote:
> Hello,
>
> It may very well be that this is a trivial problem, due to my lack of
> knowledge. I did, at least, go through all the mail lists and the
> examples of pylab (VERY NICE, BTW: I am extremely happy to have found
> it).
>
> I am trying to plot a table or matrix of graphs. I want to do this
> with a loop. So far, I have tried it with something like
>
> ## code starts here
> rownrs =3D ... # defined nr of graphs in x direction
> colnrs =3D ... # defined nr of graphs in y direction
> x =3D .... # defined x-values here
> plotnr =3D 0
> fig =3D figure()
> hold(False)
> for counter in counter_list:
> y =3D intensities_calc[counter]
> plotnr =3D plotnr+1
> ax =3D subplot(rownrs, colnrs, plotnr)
> fig.add_subplot(ax)
> plot(x,y)
> if ax.is_last_row():
> ax.set_xlabel('time')
> show()
>
> ### code ends here
>
> all i get is one graph, in the first position. no error messages.
>
> please, what am i doing wrong ?
>
> very grateful for an answer..
>
> Jakob
>
> --
> Jakob J. Lopez (Jak...@gm...)
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live webc=
ast
> and join the prime developer group breaking into this new coding territor=
y!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|