Hello,
I almost finished my graphs for publication. The last thing I wanna change is the colors. I want my graph to be black and white. I have two different datasets, one is red and the other is blue by default.
I would like to render the red bars black, and the blue ones white.
Here is the code:
____________________________________________________________
from pyx import *
text.set(mode="latex")
mynestedbaraxis = graph.axis.bar(defaultsubaxis=graph.axis.bar(dist=0))
g = graph.graphxy(width=8, x=mynestedbaraxis,
y=graph.axis.lin(min=0, max=430, title="Number of SAGE tags"),
y2=graph.axis.lin
(min=0, max=4000000, title="Number of copies/$\mu$g of total RNA"))
g.plot([graph.data.list([["GDX", 422], ["DHT", 71]], xname=1, y=2),
graph.data.list([["GDX", 3828629, 17760], ["DHT", 1328775, 38357]], xname=1, y2=2, dy2=3)],
[graph.style.barpos(fromvalue=0, subnames = ["SAGE", "Q\_RT-PCR"]), graph.style.bar(), graph.style.errorbar()])
g.text(g.width/2, g.height + 0.5, "1-acylglycerol-3-phosphate O-acyltransferase 2",
[text.halign.center, text.valign.bottom])
g.writeEPSfile("agpat2")
g.writePDFfile("agpat2")
____________________________________________________________
What should I do?
Thank you,
Carl
- [PyX-user] Colors in bar graph Carl Bolduc
- Re: [PyX-user] Colors in bar graph Andre Wobst
