add the changebar style ... :-)
[PyX/mjg.git] / examples / bargraphs / addontop.py
blobd5a2163939bc9f61e8c7df6ab4e612297b3e9813
1 # When stacking bars on top of each other you can
2 # either specify the end values of the bars (default)
3 # or set the addontop argument of the stackedbarpos
4 # style as shown in this example.
6 from pyx import *
8 g = graph.graphxy(width=8, x=graph.axis.bar())
9 g.plot(graph.data.list([(i, i, 1) for i in range(1, 10)],
10 xname=1, y=2, stack=3),
11 [graph.style.bar(),
12 graph.style.stackedbarpos("stack", addontop=1),
13 graph.style.bar([color.rgb.green])])
14 g.writeEPSfile("addontop")
15 g.writePDFfile("addontop")