File: HWidentify.Rd

package info (click to toggle)
r-cran-teachingdemos 2.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,168 kB
  • sloc: makefile: 2
file content (72 lines) | stat: -rw-r--r-- 2,508 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
\name{HWidentify}
\Rdversion{1.1}
\alias{HWidentify}
\alias{HTKidentify}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ Show label for point being Hovered over. }
\description{
  These functions create a scatterplot then you Hover the mouse pointer
  over a point in the plot and it will show an id label for that point.
}
\usage{
HWidentify(x, y, label = seq_along(x), lab.col="darkgreen",
pt.col="red", adj=c(0,0), clean=TRUE, xlab = deparse(substitute(x)),
ylab = deparse(substitute(y)), ...)
HTKidentify(x, y, label = seq_along(x), lab.col="darkgreen",
pt.col="red", adj=c(0,0), xlab = deparse(substitute(x)),
ylab = deparse(substitute(y)), ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{x}{ x-coordinates to plot }
  \item{y}{ y-coordinates to plot}
  \item{label}{ Labels to show for each point }
  \item{lab.col}{The color to plot the labels}
  \item{pt.col}{The color of the highlighting point}
  \item{adj}{The adjustment of the labels relative to the cursor point.
    The default places the label so that its bottom left corner is at
    the curser, values below 0 or greater than 1 will move the label to
    not touch the cursor.}
  \item{clean}{Logical value, should any labels on the plot be removed
    at the end of the plotting.}
  \item{xlab}{ Label for x-axis }
  \item{ylab}{ Label for y-axis}
  \item{\dots}{additional arguments passed through to plot}
}
\details{
  This is an alternative to the \code{identify} function.  The label
  only shows up for the point currently closest to the mouse pointer.
  When the mouse pointer moves closer to a different point, the label
  changes to the one for the new point.  The currently labeled point is
  also highlighted.  HWidentify only works on windows, HTKidentify
  requires the tkrplot package.
}
\value{
These functions are run for their side effects, nothing meaningful is returned.
}
%\references{
%% ~put references to the literature/web site here ~
%}
\author{
Greg Snow, \email{538280@gmail.com}
}
%\note{
%%  ~~further notes~~
%}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{identify}}
}
\examples{
if( interactive() ){
  tmpx <- runif(25)
  tmpy <- rnorm(25)
  HTKidentify(tmpx,tmpy, LETTERS[1:25], pch=letters)
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ dynamic }
\keyword{ iplot }