Search notes:

R function: points

x2 <- c(-10:20)
y2 <- x2*x2/4 + 5*x2 + 3

x1 <- c(-15:25)
y1 <- x1*x1*x1/22 - x1*x1*1.505 + 11*x1 - 10

x11()

plot(x2, y2, col=2)

z <- locator(1) # wait for mouse click or enter pressed


# Add a few new plots
# Note: doesn't resize the plot area!
points(x1, y1, col=3)


z <- locator(1) # wait for mouse click or enter pressed

plot(1:100, 1:100, type='n') # type='n' : invisible

points (1:10*3 + 20, 1:10*3 + 30, pch=letters[1:10])

z <- locator(1)
Github repository about-r, path: /functions/points.R

See also

R functions for graphics
Index to (some) R functions

Index