Introduction to BASIC   Curves and Graphs

Coordinate System
Before drawing curves or graphs, the coordinate system should be set.

SET WINDOW x1, x2, y1, y2
sets the coordinate system where the range of x coordinate is from x1 to x2, and the range of y coordinate is from y1 to y2.

Coordinate axes
DRAW axes
draws the axes of coordinate.

PLOT LINES
PLOT LINES statements draw segments continuously.
A sequential execution of
PLOT LINES: x,y;
draws an approximation of a curve.
Example.

10 DEF f(x)=x^3-x
20 SET WINDOW -4,4,-4,4
30 DRAW axes
40 FOR x=-4 TO 4 STEP 0.01
50     PLOT LINES: x,f(x);
60 NEXT x
70 END



Refer to PLOT LINES