A basic example

Let's start with a graph of vector Y versus vector X, using all the program defaults. First we generate some 'data', then set up the automatic axis labels and then draw the graph.

 PI = ACOS(-1)
 X = [1:180:2]*PI/180
 Y = SIN(X)
 SET XLABEL 'X (Radians)'
 SET YLABEL 'SIN(X)'
 GRAPH X Y
 

Now consider the following commands, which produce two graphs in seperate windows.

 WINDOW 5
 SET XLABEL 'cosh(x)+sin(1/(.1+x<^>2<_>)) vs. x'
 X=[0:3:.01]
 GRAPH X COSH(X)+SIN(1/(.1+X^2))
 WINDOW 7
 SET XLABEL 'x*cos(x)  vs.  x*sin(x)'
 X=[0:19*PI:.5]*2.55555
 GRAPH SIN(X)*X COS(X)*X
 

  Fill the area under a curve
  A script to plot a curve with axes