Hi,
I don't know whether this is a upstream issue, but the following simple
script crashes with the following error when using the 0.7 Debian
experimental packages that Graham Wilson just made available. It works
fine with 0.6.3.
*********************************************************************
from pyx import *
x = range(10)
y = [i**2 for i in x]
dat = [[i,j] for i in x for j in y]
g = graph.graphxy(width=8)
g.plot(graph.data.list(dat, x=1, y=2), graph.style.line())
g.writeEPSfile("bug")
**********************************************************************
Traceback (most recent call last):
File "bug.py", line 9, in ?
g.plot(graph.data.list(dat, x=1, y=2), graph.style.line())
File "/usr/lib/python2.3/site-packages/pyx/graph/graph.py", line
233, in plot
plotitems.append(plotitem(self, d, styles))
File "/usr/lib/python2.3/site-packages/pyx/graph/graph.py", line
159, in __init__
for s in styles:
TypeError: iteration over non-sequence
Also, at the top of
http://pyx.sourceforge.net/examples/graphs/index.html in the comment
************************************************************************
# graph styles can be modified by a second parameter to the plot method:
# g.plot(graph.data.file("minimal.dat", x=1, y=2), graph.line())
************************************************************************
for the graphs/minimal example
should graph.line() be graph.style.line() instead? I get the error
Traceback (most recent call last):
File "tmp.py", line 5, in ?
g.plot(graph.data.file("minimal.dat", x=1, y=2), graph.line())
AttributeError: 'module' object has no attribute 'line'
when using as described (0.6.3), but it works if `style' is added.
Faheem.
|