From: Carl B. <dr...@gm...> - 2008-02-20 16:25:15
|
Ok, by diging the examples, I was able to get error bars on my graph using the latest release of PyX. But now, my x axis is messed up. In the previous code that I had, my x axis was correctly identified and now it is just showing 1,2 and 3. It is not as bad as it was cause I can fix the x axis labels in gimp but I would prefer a more elegant solution. If someone can help get my previous x axis labels back, it would be very nice. Here are the new script and data file: from pyx import * g = graph.graphxy(width=10, x=graph.axis.nestedbar(), y=graph.axis.lin(min=0, max=1100, title="Number of SAGE tags"), y2=graph.axis.lin(min=0, max=700000000, title="Number of copies/$\mu$g of total RNA"), x2=None) g.plot([graph.data.file("minimal.dat", xname="$0, 0", y=2, dy=4), graph.data.file("minimal.dat", xname="$0, 1", y2=3)], [graph.style.errorbar(), graph.style.bar([color.rgb.green]), graph.style.bar()]) g.text(g.width/2, g.height + 0.5, "Cytochrome c oxidase I, mitochodrial", [text.halign.center, text.valign.bottom]) g.writeEPSfile("errors") minimal.dat: F 112 311902372 5 LF 817 653535925 10 HF 1035 415062006 8 |