1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
<HTML>
<HEAD>
<TITLE>A basic example</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<P><font size="+2" color="green">A basic example</font></P>
<P>
Let's start with a graph of vector <code>Y</code> versus vector
<code>X</code>, using all the program defaults. First we generate
some 'data', then set up the automatic axis labels and then draw the graph.</P>
<P>
<font color="blue"><PRE>
PI = ACOS(-1)
X = [1:180:2]*PI/180
Y = SIN(X)
SET XLABEL 'X (Radians)'
SET YLABEL 'SIN(X)'
GRAPH X Y
</PRE></font>
</p>
<p>
<center><IMG SRC="basic-graph.gif"></center></p>
<P>
Now consider the following commands, which produce two graphs in seperate windows.</P>
<P>
<font color="blue"><PRE>
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
</PRE></font></p>
<p>
<center><IMG SRC="sincos.gif"></center></p>
<P>
<a href="fillareacurve.htm"><img src="../shadow_left.gif">
<font size="+1" color="olive">Fill the area under a curve</font></a><br />
<a href="scripttoplot.htm"><img src="../shadow_right.gif">
<font size="+1" color="olive">A script to plot a curve with axes</font></a>
</P>
</BODY>
</HTML>
|