matplot(x, y, type="p", lty=1:5, pch=NULL, col=1:6, xlab=NULL, ylab=NULL, xlim=NULL, ylim=NULL, ..., add= FALSE) matpoints(x, y, lty=1:5, pch=NULL, col=1:6) matlines (x, y, lty=1:5, pch=NULL, col=1:6)
x,y
|
vectors or matrices of data for plotting.
The number of rows should match.
If one of them are missing, the other is taken as y and an x
vector of 1:n is used.
Missing values (NA s) are allowed.
|
type
|
character string, telling which type of plot
("p" , points; "l" , lines; "b" , both; "o" ,
overplotted both; "n" , none; or "h" , high-density) should be done
for each column of y . The first character of type defines the
first plot, the second character the second, etc.
Characters in type are cycled through; e.g., "pl" alternately plots
points and lines.
|
lty
| vector of line types. The first element is for the first column, the second element for the second column, etc., even if lines are not plotted for all columns. Line types will be used cyclically until all plots are drawn. |
pch
| character string (length 1 vector) or vector of 1-character strings for plotting-characters. The first character is the plotting-character for the first plot, the second for the second, etc. The default is the digits (1 through 9, 0) then the letters. |
col
| vector of colors. Colors are used cyclically. |
xlim, ylim
| |
xlab, ylab
| |
...
|
Graphical parameters (see par ) may also be
supplied as arguments to this function.
In addition, the high-level graphics control arguments
described under par and the arguments to
title may be supplied to this function.
|
add
|
logical. If TRUE , plots are added to current one, using
points and lines .
|
verbose
|
logical. If TRUE , write one line of what is done.
|
matplot
generates a new plot; matpoints
and
matlines
add to the current one.
The first column of x
is plotted against the first column of y
, the
second column of x
against the second column of y
, etc.
If one matrix has fewer columns, plotting will cycle back
through the columns again. (In particular, either x
or
y
may be a vector, against which all columns of the other
argument will be plotted.)
Because plotting symbols are drawn with lines and because these functions
may be changing the line style, you should probably specify lty=1
when using plotting symbols.
plot
, points
, lines
,
matrix
, par
.