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.
11
g = graph.graphxy(width=8, x=graph.axis.bar())
12
g.plot(graph.data.file("bar.dat", xname=0, y=2, stack=3),
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")