|
From: Steven W. <wal...@pa...> - 2005-06-30 23:29:45
|
I have a pretty simple script working right now, and I'm still
relatively new to python so if I'm going at this in a stupid way,
please let me know.
right now it has the following:
a_mag = Gnuplot.Data(w, cols=(1,6), inline=1)
a_mag.set_option(title='Amide Dipole')
a_mag.set_option(with='lines')
mags.append(a_mag)
s_mag = Gnuplot.Data(w, cols=(1,10), inline=1)
s_mag.set_option(title='Side Chain Dipole')
s_mag.set_option(with='lines')
mags.append(s_mag)
when I use the command:
g.plot(a_mag, s_mag)
everything works fine. I would like however to add or remove certain
plots from within the script, but alas the command:
g.plot(mags)
or
g.plot(tuple(mags))
does not work. I get the following error messages:
Traceback (most recent call last):
File "./fasttest.py", line 215, in ?
g.plot(mags)
File "/usr/local/lib/python2.4/site-packages/Gnuplot/_Gnuplot.py",
line 273, in plot
self._add_to_queue(items)
File "/usr/local/lib/python2.4/site-packages/Gnuplot/_Gnuplot.py",
line 243, in _add_to_queue
self.itemlist.append(PlotItems.Data(item))
File "/usr/local/lib/python2.4/site-packages/Gnuplot/
PlotItems.py", line 513, in Data
set = utils.float_array(set[0])
File "/usr/local/lib/python2.4/site-packages/Gnuplot/utils.py",
line 36, in float_array
return Numeric.asarray(m, Numeric.Float32)
File "/usr/local/lib/python2.4/site-packages/Numeric/Numeric.py",
line 134, in asarray
return multiarray.array(a, typecode, copy=0, savespace=savespace)
AttributeError: _InlineFileItem instance has no attribute '__float__'
Any suggestions?
Thanks for any help,
Steve
|