|
From: Martín M. <mar...@gm...> - 2020-06-09 13:38:41
|
Hi,
and welcome to the PyX club :)
>
Not the best way to join the club by forgetting to add a subject. :(
> The current version of PyX is 0.15 for the Fedora rpm, by the way.
> Independent of that:
>
Maybe because I'm still on Fedora 30. I installed the packages yesterday,
so seems that the last available version here. Plans to move to F32 are on
my TODO
> Presumably, your ts is not a list of numbers but strings (labels). You
> probably want to convert them or use them as labels by using
> `xname=ts` instead of `x=ts`.
>
Oh my! Didn't have that. And yes, ts is a list of str with the time of the
occurrence that is stored in fulldata["waittime"]
Now it fails in a completely different way. :-D
Code snippet with actual data to test:
```
ts=['13:00','13:15','13:30','13:45','14:00','14:15','14:30']
waittime = [560, 580, 540, 800, 1000, 600, 560]
attrs = [color.gradient.RedBlue]
g = graph.graphxy(width=600, key=graph.key.key())
g.plot(graph.data.values(xname=ts, y=waittime),
[graph.style.line(attrs),
graph.style.symbol(graph.style.symbol.changesquare,
symbolattrs=attrs, size=0.1)])
g.writeEPSfile("waittime")
g.writePDFfile("waittime")
```
```
Traceback (most recent call last):
File "build_graf.py", line 61, in <module>
graph.style.symbol(graph.style.symbol.changesquare, symbolattrs=attrs,
size=0.1)])
File "/usr/lib64/python3.7/site-packages/pyx/graph/graph.py", line 215,
in plot
plotitems.append(plotitem(self, d, styles))
File "/usr/lib64/python3.7/site-packages/pyx/graph/graph.py", line 93, in
__init__
self.usedcolumnnames.update(set(s.columnnames(privatedata,
self.sharedata, graph, self.data.columnnames, self.dataaxisnames)))
File "/usr/lib64/python3.7/site-packages/pyx/graph/style.py", line 440,
in columnnames
raise ValueError("incomplete position information")
ValueError: incomplete position information
```
Regards, Martín
--
Martín Marqués
It’s not that I have something to hide,
it’s that I have nothing I want you to see
|