Draw an Area with a Hatch Pattern

SET AREA STYLE "HATCH" changes the hatch patterns with which PLOT AREA statements draw areas.
The pattern is available numbers from 1 to 6, which SET AREA STYLE INDEX indicates.

Example.

100 DEF f(x)=x^2-3*x
110 OPTION BASE 0
120 DIM x(100),y(100)
130 FOR i=0 TO 100
140    LET x(i)=-5+i/10
150    LET y(i)=f(x(i))
160 NEXT i
170 SET AREA STYLE "HATCH"
180 SET AREA STYLE INDEX 4
190 SET WINDOW -5,5,-5,5
200 DRAW axes
210 MAT PLOT AREA : x,y
220 END




Back