prevent double call of _cleanup, which harms usefiles (and is a bad idea in general)
[PyX.git] / examples / axis / manualticks.py
blob5f1c3dbf2e86dc73ce4b6cb4db3ca3a8efb22ebd
1 import math
2 from pyx import *
4 p1 = path.curve(0, 0, 3, 0, 1, 4, 4, 4)
5 p2 = p1.transformed(trafo.translate(4, 0))
7 myticks = [graph.axis.tick.tick(math.pi, label="\pi", labelattrs=[text.mathmode]),
8 graph.axis.tick.tick(2*math.pi, label="2\pi", labelattrs=[text.mathmode])]
10 c = canvas.canvas()
11 c.insert(graph.axis.pathaxis(p1, graph.axis.linear(min=0, max=10)))
12 c.insert(graph.axis.pathaxis(p2, graph.axis.linear(min=0, max=10, manualticks=myticks)))
13 c.writeEPSfile("manualticks")
14 c.writePDFfile("manualticks")
15 c.writeSVGfile("manualticks")