Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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

Note:

Example:
library("plot")
x=1:10
y=x^2
plot(x~y)

Result:
plot is shown in the display plotdisplay
Example:
library("plot")
x=1:10
y=x^2
plot(x,y)

Result:
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.
Example:
library("plot")
x=1:10
y=x^2
plot(x~y)
z=x~(1-x^2)
adddata(plotdisplay, 1, 1, z)

Result:
plot of z together with the already plotted object



Author: T. T. Koetter, 19961205 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006