properly apply skippedline by the new flushskippedline method
[PyX/mjg.git] / examples / bargraphs / stacked.py
blob66045ca7dc1320d043dd2840a67e92c094acef8e
1 # To stack bars on top of each other, you can add
2 # stackedbarpos styles and and bars to the styles.
3 # The stackbarpos need to get different column names
4 # each time to access new stack data. This example
5 # also adds text styles to the bars, which just
6 # repeat the value column data here, but they could
7 # refer to other columns as well.
9 from pyx import *
11 g = graph.graphxy(width=14, height=6, x=graph.axis.bar())
12 g.plot(graph.data.file("stacked.dat", xname=0, y=2, stack=3),
13 [graph.style.bar(),
14 graph.style.text("y"),
15 graph.style.stackedbarpos("stack"),
16 graph.style.bar([color.rgb.green]),
17 graph.style.text("stack")])
18 g.writeEPSfile("stacked")
19 g.writePDFfile("stacked")