update the axes examples to the new structure -- hopefully its now becoming more...
[PyX/mjg.git] / examples / axis / parter.py
blob10a731f865645907377b4d2c6fd7a11ef804c1c9
1 import math
2 from pyx import *
4 p = path.curve(0, 0, 3, 0, 1, 4, 4, 4)
6 myparter = graph.axis.parter.linear(["1/3", "1/6"])
8 c = canvas.canvas()
9 c.insert(graph.axis.pathaxis(p, graph.axis.linear(min=0, max=1, parter=myparter)))
10 c.insert(graph.axis.pathaxis(p.transformed(trafo.translate(4, 0)),
11 graph.axis.linear(min=0, max=1, parter=myparter,
12 texter=graph.axis.texter.rational())))
13 c.writeEPSfile("parter")
14 c.writePDFfile("parter")