reduce length of pattern lines by one order of magnitude to prevent problems with...
[PyX/mjg.git] / examples / bargraphs / multisubaxis.py
blobc3020fcff40b2fc9741e73ed9b4eaddb8eba9615
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.
6 from pyx import *
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")