plot.default {base} | R Documentation |
plot.default(x, y=NULL, type = "p", col = par("fg"), bg = NA,
pch = par("pch"), xlim = NULL, ylim = NULL, log = "",
axes = TRUE, frame.plot = axes, panel.first = NULL,
panel.last = NULL, ann = par("ann"), main = NULL,
xlab = NULL, ylab = NULL, cex = par("cex"),
lty = par("lty"), lwd = par("lwd"), ...)
x , y |
the |
type |
the type of plot desired. The following possibilities are
possible; |
col |
The colors for lines and points. Multiple colors can be specified so that each point can be given its own color. If there are fewer colors than points they are recycled in the standard fashion. |
bg |
background color of ??? |
pch |
a vector of plotting characters or symbols. |
xlim |
the x limits (min,max) of the plot. |
ylim |
the y limits of the plot. |
log |
a character string which contains |
axes |
a logical value indicating whether axes should be drawn on the plot. |
frame.plot |
a logical indicating whether a box should be drawn around the plot. |
panel.first |
an expression to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids or scatterplot smooths. |
panel.last |
an expression to be evaluated after plotting has taken place. |
ann |
an logical value indicating whether the default annotation (title and x and y axis labels) should appear on the plot/ |
main |
a main title for the plot. |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
cex |
a numerical value giving the amount by which plotting text and symbols should be scaled relative to the default |
lty |
the line type |
lwd |
the line width (is this used at all ???) |
... |
graphical parameters may also be passed as arguments. |
This function is invoked for its side effect of drawing a scatter plot in the active graphics window.
Cleveland, W. S. (1985). The Elements of Graphing Data. Monterey, CA: Wadsworth.
plot
, xy.coords
.
data(cars)
Speed <- cars$speed
Distance <- cars$dist
plot(Speed, Distance, panel.first = grid(8,8),
pch = 0, cex = 1.2, col = "blue")
plot(Speed, Distance,
panel.first = lines(lowess(Speed, Distance), lty = "dashed"),
pch = 0, cex = 1.2, col = "blue")