3 from pyx
.graph
import axis
5 class piaxis(axis
.linear
):
7 def __init__(self
, divisor
=math
.pi
,
8 texter
=axis
.texter
.rational(suffix
="\pi"), **kwargs
):
9 axis
.linear
.__init
__(self
, divisor
=divisor
, texter
=texter
, **kwargs
)
12 p
= path
.path(path
.moveto(0, 0), path
.curveto(3, 0, 1, 4, 4, 4))
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=1e5
)))
18 c
.insert(axis
.pathaxis(p
.transformed(trafo
.translate(8, 0)),
19 piaxis(min=0, max=2*math
.pi
)))
20 c
.writeEPSfile("texter")
21 c
.writePDFfile("texter")