Source
18 setfontsize
-5 5 setxrange
-2 2 setyrange

/f {
   Sin
} def

50 setxunit
[1 1 .5 .5 .1 .1] {orange} Quadrillage
.7 setlinewidth
tracerepere
ymarks
[pi dup neg pi 2 div dup neg 3 pi mul 2 div dup neg] {xtick} apply
gsave
   bleu
   1.75 setlinewidth
   {f} courbe
grestore

setTimesItalic
   (O) O drtext


#tex# $\pi $
pi 0 [1.5 dup] dctexlabel
#tex# $-\pi $
pi neg 0 (-3 0) [1.5 dup] dctexlabel
#tex# ${\pi \over 2}$
pi 2 div 0 [1.5 dup] dctexlabel
#tex# $-{\pi \over 2}$
pi -2 div 0 [1.5 dup] dctexlabel
#tex# ${3\pi \over 2}$
3 pi mul 2 div 0 [1.5 dup] dctexlabel
#tex# $-{3\pi \over 2}$
-3 pi mul 2 div 0 [1.5 dup] dctexlabel

<tex>
$$
   y = \sin x
$$
</tex>

/dx_boxit 3 def
/dy_boxit 3 def
/fillstyle {jaune fill} def
/linearc .05 def
boxit
-2 1 [2 dup] cctexlabel