Dear all,
I'm trying to produce a bar chart with bars filled with a hatch pattern. I
tried to do this using the pattern module, as shown in the attached code
snippet (as a simple test, I borrowed the "PyX" logo pattern from the
gallery on the PyX website as my pattern).
The result I get (with PyX 0.9) is a bizarre grid pattern. I was
wondering, have I done something wrong, or is this a PyX bug?
Thanks,
Dominic.
from pyx import *
from math import *
data=[]
for i in range(5):
x = -5.0 + float(i)*2.0
y = sin(x)
data.append([x,y])
g = graph.graphxy(width=8, key=graph.key.key(),
x=graph.axis.linear(title="x",min=-5,max=5),
y=graph.axis.linear(title="y",min=-1,max=1))
p = pattern.pattern() ; p.text(0, 0, r"\PyX")
g.plot(graph.data.list(data,title="sin(x)",x=1,y=2),[
graph.style.histogram(fillable=1, lineattrs=[deco.filled([color.cmyk.Red,p])])
])
g.writeEPSfile("pyx_histogram.eps")
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user