| 2 |
r |
1 |
\name{plot.default}
|
|
|
2 |
\title{The Default Scatterplot Function}
|
|
|
3 |
\usage{
|
| 318 |
maechler |
4 |
plot.default(x, y=NULL, type = "p", col = par("fg"), bg = NA,
|
| 286 |
maechler |
5 |
pch = par("pch"), xlim = NULL, ylim = NULL, log = "",
|
| 318 |
maechler |
6 |
axes = TRUE, frame.plot = axes, panel.first = NULL,
|
| 48 |
hornik |
7 |
panel.last = NULL, ann = par("ann"), main = NULL,
|
|
|
8 |
xlab = NULL, ylab = NULL, cex = par("cex"),
|
|
|
9 |
lty = par("lty"), lwd = par("lwd"), \dots)
|
| 2 |
r |
10 |
}
|
|
|
11 |
\alias{plot.default}
|
|
|
12 |
\arguments{
|
| 48 |
hornik |
13 |
\item{x,y}{the \code{x} and \code{y} arguments provide the x and y
|
|
|
14 |
coordinates for the plot. Any reasonble way of defining the
|
|
|
15 |
coordinates is acceptable. See the function \code{\link{xy.coords}}
|
|
|
16 |
for details.}
|
|
|
17 |
\item{type}{the type of plot desired. The following possibilities are
|
|
|
18 |
possible; \code{"p"} for points, \code{"l"} for lines, \code{"o"}
|
|
|
19 |
for overplotted points and lines, \code{"b"} or \code{c} for points
|
| 286 |
maechler |
20 |
joined by lines, \code{"s"} and \code{"S"} for step functions and
|
| 48 |
hornik |
21 |
\code{"h"} for \emph{high density} vertical lines.}
|
|
|
22 |
\item{col}{The colors for lines and points. Multiple colors can be
|
|
|
23 |
specified so that each point can be given its own color. If there
|
|
|
24 |
are fewer colors than points they are recycled in the standard
|
|
|
25 |
fashion.}
|
| 318 |
maechler |
26 |
\item{bg}{background color of ???}
|
| 48 |
hornik |
27 |
\item{pch}{a vector of plotting characters or symbols.}
|
| 318 |
maechler |
28 |
\item{xlim}{the x limits (min,max) of the plot.}
|
| 48 |
hornik |
29 |
\item{ylim}{the y limits of the plot.}
|
|
|
30 |
\item{log}{a character string which contains \code{"x"} if the x axis
|
|
|
31 |
is to be logarithmic, \code{"y"} if the y axis is to be logarithmic
|
|
|
32 |
and \code{"xy"} or \code{"yx"} if both axes are to be logarithmic.}
|
|
|
33 |
\item{axes}{a logical value indicating whether axes should be drawn on
|
|
|
34 |
the plot.}
|
|
|
35 |
\item{frame.plot}{a logical indicating whether a box should be drawn
|
|
|
36 |
around the plot.}
|
|
|
37 |
\item{panel.first}{an expression to be evaluated after the plot axes
|
|
|
38 |
are set up but before any plotting takes place. This can be useful
|
|
|
39 |
for drawing background grids or scatterplot smooths.}
|
|
|
40 |
\item{panel.last}{an expression to be evaluated after plotting has
|
|
|
41 |
taken place.}
|
|
|
42 |
\item{ann}{an logical value indicating whether the default annotation
|
|
|
43 |
(title and x and y axis labels) should appear on the plot/}
|
|
|
44 |
\item{main}{a main title for the plot.}
|
|
|
45 |
\item{xlab}{a label for the x axis.}
|
|
|
46 |
\item{ylab}{a label for the y axis.}
|
|
|
47 |
\item{cex}{a numerical value giving the amount by which plotting text
|
|
|
48 |
and symbols should be scaled relative to the default}
|
|
|
49 |
\item{lty}{the line type}
|
|
|
50 |
\item{lwd}{the line width (is this used at all ???)}
|
|
|
51 |
\item{\dots}{graphical parameters may also be passed as arguments.}
|
| 2 |
r |
52 |
}
|
|
|
53 |
\value{
|
| 48 |
hornik |
54 |
This function is invoked for its side effect of drawing a scatter plot
|
|
|
55 |
in the active graphics window.
|
| 2 |
r |
56 |
}
|
|
|
57 |
\references{
|
| 48 |
hornik |
58 |
Cleveland, W. S. (1985).
|
|
|
59 |
\emph{The Elements of Graphing Data}.
|
|
|
60 |
Monterey, CA: Wadsworth.
|
| 2 |
r |
61 |
}
|
|
|
62 |
\seealso{
|
| 48 |
hornik |
63 |
\code{\link{plot}}, \code{\link{xy.coords}}.
|
| 2 |
r |
64 |
}
|
|
|
65 |
\examples{
|
|
|
66 |
data(cars)
|
|
|
67 |
Speed <- cars$speed
|
|
|
68 |
Distance <- cars$dist
|
| 48 |
hornik |
69 |
plot(Speed, Distance, panel.first = grid(8,8),
|
|
|
70 |
pch = 0, cex = 1.2, col = "blue")
|
| 286 |
maechler |
71 |
plot(Speed, Distance,
|
| 48 |
hornik |
72 |
panel.first = lines(lowess(Speed, Distance), lty = "dashed"),
|
|
|
73 |
pch = 0, cex = 1.2, col = "blue")
|
| 2 |
r |
74 |
}
|
| 286 |
maechler |
75 |
\keyword{hplot}
|