Hi Alan,
On 10.03.06, Alan G Isaac wrote:
> Sure. But I cannot even get the first instance to work.
I'm sorry, this is a bug. (It has its origin in the way we did bar
graphs in older releases, where a bar needed to make the nesting and
the stacking all at the same time.) Fixed it in changeset 2576.
However, without nesting of bar axes and styles, you don't need to use
changeable attributes and than the problem doesn't occur. And when
using the bar style multiple times the proper select is performed at
PyX 0.8.1 as well, such that with the following changes everything
should work as expected.
> ############# script ################################
> import pyx
> print "PyX version: ", pyx.__version__
# Cool. Like that.
> g = pyx.graph.graphxy(width=8,
> x=pyx.graph.axis.bar(),
x=pyx.graph.axis.nestedbar(),
> y=pyx.graph.axis.linear(min=0,
> max=10,
> parter=None,
>
> manualticks=[pyx.graph.axis.tick.tick(10*xi/5) for xi in range(6)]))
> # this works fine:
> mystyle = pyx.graph.style.bar(barattrs=[pyx.color.rgb.green])
> # this works not at all:
> mystyle =
> pyx.graph.style.bar(barattrs=[pyx.attr.changelist([pyx.color.rgb.red,
> pyx.color.rgb.green])])
> g.plot(pyx.graph.data.list(zip(["two","four","six"],[2,4,6]),xname=1,y=2),
> [mystyle])
g.plot([pyx.graph.data.list(zip(["two","four","six"],[2,4,6]),xname=1,y=2),
pyx.graph.data.list(zip(["two","four","six"],[3,5,7]),xname=1,y=2)],
[mystyle])
> g.writeEPSfile("c:\\temp\\temp.eps")
HTH,
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) [EMAIL PROTECTED], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user