Hi
I would like to plot a histogram with errorbars. I tried the obvious
way, by specifying dy values but that has unexpected results.
A quick google didn't yield anything promising ;(
The following script demonstrates my problem and my current work around.
import pyx
d = [1,2,3,4,5,6,7,8,9,10]
data = pyx.graph.data.values(x=d, y=d, dy=[2]*len(d), title="data")
g = pyx.graph.graphxy(width=8, key=pyx.graph.key.key())
g.plot(data, [pyx.graph.style.histogram()])
g.writePDFfile("pyx-test")
# work around
data = pyx.graph.data.values(x=d, y=d, title="data")
# empty title to suppres it appearing in the key
errors = pyx.graph.data.values(x=d, y=d, dy=[2]*len(d), title="")
g = pyx.graph.graphxy(width=8, key=pyx.graph.key.key())
g.plot(data, [pyx.graph.style.histogram()])
g.plot(errors, [pyx.graph.style.errorbar()])
g.writePDFfile("pyx-test")
All ideas welcome ;]]
tim
--
http://tim.jottit.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user