fix load_def message parser
[PyX.git] / design / dtk / piaxis.py
blob01722cff4885bfa6544aff3dc9947aaec52fac6f
1 from math import pi
2 from pyx import *
3 from pyx.graph.axis import linear
4 from pyx.graph.axis.texter import rational
6 g = graph.graphxy(width=8, key=graph.key.key(pos="bl"),
7 x=linear(min=0, max=2*pi, title="$x$", divisor=pi,
8 texter=rational(suffix=r"\pi")),
9 y=linear(title="$y$"))
11 g.plot(graph.data.function("y(x)=sin(x)", title=r"$\sin(x)$"))
12 g.plot(graph.data.function("y(x)=cos(x)", title=r"$\cos(x)$"))
14 g.writeEPSfile("piaxis")