Library: | plot |
See also: | createdisplay show line |
Quantlet: | plot | |
Description: | convenient function for plotting results. Creates a global variable (plotdisplay) that contains a plot with at most five dataparts. |
Usage: | plot (x1, {x2, x3, x4, x5}) | |
Input: | ||
x1 | n x 2 matrix, containing x and y values for plot | |
x2 - x5 | n x 2 matrices, optional dataparts for the plot |
library("plot") x=1:10 y=x^2 plot(x~y)
plot is shown in the display plotdisplay
library("plot") x=1:10 y=x^2 plot(x,y)
An error window appears with the message: wrong argument type, must be numeric in plot line: 52, show: wrong count of column. An empty display will be open. If you type plot(x,y) then you have two parameters which are nx1 matrices. It has another meaning than plot(x~y), where x~y is a nx2 matrix.
library("plot") x=1:10 y=x^2 plot(x~y) z=x~(1-x^2) adddata(plotdisplay, 1, 1, z)
plot of z together with the already plotted object