1 # You can build a nested bar axis yourself. Compared to the
2 # default nestedbar axis, we keep the original bar axis painter
3 # for the subaxes to include their names. Note also, that each
4 # of the subaxes can have different number of bars.
8 mynestedbaraxis
= graph
.axis
.bar(defaultsubaxis
=graph
.axis
.bar(dist
=0))
10 g
= graph
.graphxy(width
=8, x
=mynestedbaraxis
)
11 g
.plot([graph
.data
.list([[("A", "x"), 5], [("B", "x"), 6]], xname
=1, y
=2),
12 graph
.data
.list([[("A", "y"), 7], [("B", "y"), 8], [("C", "y"), 9]], xname
=1, y
=2)],
13 [graph
.style
.barpos(fromvalue
=0), graph
.style
.bar()])
14 g
.writeEPSfile("multisubaxis")
15 g
.writePDFfile("multisubaxis")