[Tutor] unsupported operand
stm atoc
stm.at.oc at googlemail.com
Sat Dec 17 21:30:17 CET 2011
Hi there,
I would like to define concentration array based on time and then plot it.
Here is the profile:
from pylab import *
import numpy
import array
import math
tmax=1*3600
t = 1.
outfile=open('ourtest_out.list','w')
N = 100
Conc1 = arange([0, tmax])
outfile.close()
lw = 2.0 #linewidth
dpi = 96
figure(figsize=(12,6),dpi=dpi)
pyplot.plot(Conc1, t,'r-',label='Conc' )
savefig('Conc.png')
show()
and this is the error that I got:
TypeError: unsupported operand type(s) for -: 'list' and 'int'
What would you suggest?
Thank you,
Sue
More information about the Tutor
mailing list