plotfile: single column plot not working

I have a file with a single column of data like:

1
2
3
4

I would like to use the plotfile but it's returning the error:

File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 1228, in
plotfile
  ax1 = fig.add_subplot(N,1,i)
UnboundLocalError: local variable 'N' referenced before assignment

Any help on making this work would be greatly appreciated.

Thanks for your help :slight_smile:

···


View this message in context: http://www.nabble.com/plotfile%3A--single-column-plot-not-working-tp21384473p21384473.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

It looks like you may have an old version of matplotlib, as this does
not appear to be a problem in recent versions:

In [3]: !cat test.dat
1
2
3
4

In [4]: plotfile('test.dat')

You may want to look into upgrading.

JDH

···

On Fri, Jan 9, 2009 at 9:28 PM, helstreak <helstreak@...32...> wrote:

I would like to use the plotfile but it's returning the error:

File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 1228, in
plotfile
ax1 = fig.add_subplot(N,1,i)
UnboundLocalError: local variable 'N' referenced before assignment

Any help on making this work would be greatly appreciated.