1 # Ticks can be set manually in combination with automatically created
2 # ticks. Note that the rating takes into account the manual ticks as
7 from pyx
.graph
import axis
9 p
= path
.curve(0, 0, 3, 0, 1, 4, 4, 4)
11 myticks
= [axis
.tick
.tick(math
.pi
, label
="\pi", labelattrs
=[text
.mathmode
]),
12 axis
.tick
.tick(2*math
.pi
, label
="2\pi", labelattrs
=[text
.mathmode
])]
15 c
.insert(axis
.pathaxis(p
, axis
.linear(min=0, max=10)))
16 c
.insert(axis
.pathaxis(p
.transformed(trafo
.translate(4, 0)),
17 axis
.linear(min=0, max=10, manualticks
=myticks
)))
18 c
.writeEPSfile("manualticks")
19 c
.writePDFfile("manualticks")