Example 02
ListPlot[{(x,y,x,z}]
GIVEN: Two sets of data (x,y) and (x,z)
REQUIRED: Plot the data.
SOLUTION:Generate example02.nb file:
File
New
Example02.nb
Enter your data as follows:
x[1]=0;
x[2]=1;
x[3]=2;
x[4]=3;
x[5]=4;
x[6]=5;
y[1]=6;
y[2]=7;
y[3]=8;
y[4]=9;
y[5]=10;
y[6]=11;
z[1]=12;
z[2]=14;
z[3]=16;
z[4]=18;
z[5]=20;
z[6]=22;
ListPlot[{{x[1],y[1]},{x[2],y[2]},{x[3],y[3]},{x[4],y[4]},{x[5],y[5]},{x[6],y[6]}}]
ListPlot[{{x[1],z[1]},{x[2],z[2]},{x[3],z[3]},{x[4],z[4]},{x[5],z[5]},{x[6],z[6]}}]
Example
Homework:
a. Join the points in the second plot.
Note:
You may save the figure as a postscript file:
print example02.ps
Please send questions or suggestions about this web page to beatnic@aset.psu.edu
ASET | ITS | Penn State
|