Learn R Programming

HelpersMG (version 6.2)

show_name: Show the name of a point

Description

Click on a point in plot region and it will tell you what is the point.

Usage

show_name(
  points = NULL,
  x = NULL,
  y = NULL,
  names = NULL,
  col = "red",
  silent = FALSE
)

Value

Name of the point

Arguments

points

A list with x, y and names elements

x

The x coordinates

y

The y coordinates.

names

The names of the points

col

Color of the legend.

silent

TRUE or FALSE

Author

Marc Girondot marc.girondot@gmail.com

Details

Show the name of a point

See Also

plot_errorbar

Other plot and barplot functions: ScalePreviousPlot(), barplot_errbar(), plot_add(), plot_errbar()

Examples

Run this code
if (FALSE) {
k <- plot_errbar(1:100, rnorm(100, 1, 2), 
	xlab="axe x", ylab="axe y", bty="n", xlim=c(1,100), 
		errbar.x=2, errbar.y=rnorm(100, 1, 0.1))
show_name(k)
k <- plot_errbar(1:10, rnorm(10, 1, 2), 
	xlab="axe x", ylab="axe y", bty="n", xlim=c(1,10), 
		errbar.x=2, errbar.y=rnorm(10, 1, 0.1), 
		names=LETTERS[1:10])
show_name(k)
k <- plot_errbar(1:10, rnorm(10, 1, 2), 
	xlab="axe x", ylab="axe y", bty="n", xlim=c(1,10), 
		errbar.x=2, errbar.y=rnorm(10, 1, 0.1))
show_name(k, names=LETTERS[1:10])
		}

Run the code above in your browser using DataLab