pointLabel(x, y = NULL, labels = seq(along = x), cex = 1,
method = c("SANN", "GA"),
allowSmallOverlap = FALSE,
trace = FALSE,
doPlot = TRUE,
...)
plot.default
, these provide the x and y coordinates for
the point labels. Any reasonable way of defining the coordinates is
acceptable. See the function xy.coords
for details.text
, a character vector or expression specifying the text to be
written. An attempt is made to coerce other language objects
(names and calls) to expressions, and vectors and other
classed objects totext
.TRUE
, labels are allowed
a small overlap. The overlap allowed is 2% of the diagonal
distance of the plot area.TRUE
, status updates are given as the optimization algorithms
progress.TRUE
, the labels are plotted on the
existing graph with text
.text
to specify
labeling parameters such as col
.xy
list giving the x
and y
positions of the
label as would be placed by text(xy, labels)
.cex
is used to calculate string width and
height (using strwidth
and strheight
), so passing a
different font may corrupt the label dimensions. You could get around
this by adjusting the font parameters with par
prior to running
this function.text
, thigmophobe.labels
in package n <- 50
x <- rnorm(n)*10
y <- rnorm(n)*10
plot(x, y, col = "red", pch = 20)
pointLabel(x, y, as.character(round(x,5)), offset = 0, cex = .7)
plot(x, y, col = "red", pch = 20)
pointLabel(x, y, expression(over(alpha, beta[123])), offset = 0, cex = .8)
Run the code above in your browser using DataCamp Workspace