Hello PyX-Users,
can anybody tell me how to use various user-specified
colors for comparing bar graphs? (cf. the "compare" example
at http://pyx.sourceforge.net/examples/bargraphs/index.html)
PyX-0.8.1 wouldn't accept handing multiple colors as
parameters to graph.style.bar(...). Inserting another
graph.style.bar(...) command between both graph.data.file(...)
commands was also refused.
Here's the code with just one user-specified color for both bars.
----------
from pyx import *
a = graph.axis.nestedbar(title="x-axis")
g = graph.graphxy(width=10, x=a, height=None,
y=graph.axis.linear(title="y-axis", min=0, max=10))
g.plot([graph.data.file("data.txt", xname=0, y=2),
graph.data.file("data.txt", xname=0, y=3)],
[graph.style.bar([color.rgb(0.7, 0.3, 0.5)])]
)
g.writePDFfile("bar.pdf")
g.writeEPSfile("bar.eps")
----------
Any suggestions how to color both bars user-specifically?
Regards,
Arthur
Title: various user-specified colors for nested bars
- [PyX-user] various user-specified colors for nested bars Guest2 CERT
- Re: [PyX-user] various user-specified colors for nested ... Andre Wobst
- Re[2]: [PyX-user] various user-specified colors for ... Alan G Isaac
- Re[3]: [PyX-user] various user-specified colors Alan G Isaac
- Re: [PyX-user] various user-specified colors Andre Wobst
- Re[2]: [PyX-user] various user-specifie... Alan G Isaac
- Re: [PyX-user] various user-specifi... Andre Wobst
- Re: [PyX-user] various user-specified colors for... Andre Wobst
- Re[2]: [PyX-user] various user-specified col... Alan G Isaac
- Re: [PyX-user] various user-specified c... Andre Wobst
- Re[2]: [PyX-user] various user-spec... Alan G Isaac
