Hi Markus,
On 23.02.06, Markus Meyer wrote:
> I'd like to have a bar-graph which has a line for y=0 in the middle, and
> bars above and under the line. However, a small test for this
> functionality looks totally wrong. What gives?
The bar style needs a bar position as provided by the parpos style.
Unfortunately this style by default always start bars at the baseline.
Thus you have to do:
> from pyx import *
>
> g = graph.graphxy(width=8, x=graph.axis.bar())
> g.plot(graph.data.list([(0,-2), (1, -3), (2, 5), (3, -4)], xname=0, y=2),
> [graph.style.bar()])
[graph.style.barpos(fromvalue=0), graph.style.bar()])
> g.writePDFfile("bar")
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