prevent double call of _cleanup, which harms usefiles (and is a bad idea in general)
[PyX.git] / examples / axis / parter.py
blob2d3815689d7cbdec39b5fe01d52f0119f0754b94
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")
15 c.writeSVGfile("parter")