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))