Debian Codegraph @

man/p.tachoPlot.Rd

raw
1 \name{p.tachoPlot}
2 \alias{p.tachoPlot}
3 \title{Draw Symbol on a Plot}
4 \description{
5 Puts a symbol (pointer) on a plot at each of the specified locations.
6 }
7 \usage{
8 p.tachoPlot(x, y, z, angle=c(pi/4,3*pi/4), size,
9 method = c("robust", "sensitive", "rank"),
10 legend = TRUE, show.method = legend,
11 xlab = deparse(substitute(x)), ylab = deparse(substitute(y)),
12 xlim, ylim, \dots)
13 }
14 \arguments{
15 \item{x,y,z}{coordinates of points. Numeric vectors of the same length.
16 Missing values (\code{NA}s) are allowed.}
17 \item{angle}{numeric vector whose elements give the angles between the
18 horizontal baseline and the minimum and maximum direction of the
19 pointer measured clockwise in radians.}
20 \item{size}{length of the pointers in cm.}
21 \item{method}{string specifying the method to calculate the angle of
22 the pointer. One of \code{"sensitive"}, \code{"robust"} or
23 \code{"rank"}. Only the first two characters are necessary.
24
25 The minimum and maximum direction of the pointer corresponds to
26 min(z) and max(z) if method is \code{"sensitive"} or \code{"rank"}
27 and to the upper and lower extreme of z if method is \code{"robust"}
28 (see \code{boxplot} or \code{rrange} for details). The angle is
29 proportional to z or rank(z) in case of \code{method="rank"}.
30 }
31 \item{legend}{logical flag: if \code{TRUE} (default), a legend giving
32 the values of the minimum and maximum direction of the pointer is drawn.}
33 \item{show.method}{logical flag, defaulting to \code{legend}; if true,
34 the method name is printed.}
35 \item{xlab,ylab}{labels for x and y axis; defaults to the
36 \sQuote{expression} used in the function call.}
37 \item{xlim,ylim}{numeric of length 2, the limits for the x and y axis,
38 respectively; see \code{\link{plot.default}}.}
39 \item{\dots}{further arguments to \code{\link{plot}}. Graphical
40 parameters (see \code{\link{par}}) may also be supplied as arguments
41 to this function.}
42 }
43 \section{Side Effects}{
44 A plot is created on the current graphics device.
45 }
46 \details{
47 A scatter plot of the variables x and y is plotted. The value of the third
48 variable z is given by the direction of a pointer (similar to a
49 tachometer). Observations whose z-coordinate is missing are marked by a dot.
50 }
51 \author{Christian Keller, June 1995}
52 \seealso{\code{\link{symbols}}}
53 \examples{
54 data(state)
55 data(USArrests)
56 p.tachoPlot(state.center $x, state.center $y, USArrests[,"UrbanPop"])
57
58 data(mtcars)
59 par(mfrow=c(2,2))
60 ## see the difference between the three methods (not much differ. here!)
61 %% hence, IMPROVE the example !
62 p.tachoPlot(mtcars$hp, mtcars$disp, mtcars$mpg, method="sens")
63 p.tachoPlot(mtcars$hp, mtcars$disp, mtcars$mpg, method="rank")
64 p.tachoPlot(mtcars$hp, mtcars$disp, mtcars$mpg, method="rob")
65 }
66 \keyword{hplot}