add UnicodeEngine (MultiEngineText and axis texters returning MultiEngineText), texte...
[PyX.git] / examples / axis / grid.py
blob710e3e2ffc8204d250f3d5f17b97638ca99e00c7
1 from math import pi
2 from pyx import *
3 from pyx.graph import axis
5 xgridpainter = axis.painter.regular(gridattrs=[])
6 ygridpainter = axis.painter.regular(gridattrs=[attr.changelist([style.linestyle.dashed, None])])
8 g = graph.graphxy(width=10,
9 x=axis.lin(painter=xgridpainter,
10 divisor=pi, texter=axis.texter.rational(suffix=r"\pi"), min=-4*pi, max=4*pi),
11 y=axis.lin(painter=ygridpainter))
13 g.plot(graph.data.function("y(x)=sin(x)/x", points=200))
15 g.writeEPSfile()
16 g.writePDFfile()
17 g.writeSVGfile()