locatorRS | R Documentation |
Have locator
add points on the graph directly after clicking, even in Rstudio Graphics devices
locatorRS(n = 512, type = "p", ...)
n |
Maximum number of points to plot. |
type |
As in |
... |
Further arguments passed to |
List with x and y
Berry Boessenkool, berry-b@gmx.de, Dec 2020
https://stackoverflow.com/q/65147219/1587132
if(interactive()){
plot(1:10, type="n")
locs <- locator(n=3, type="o") # click on locations in graph.
# If you do not set n at beginning, press ESC to finish
locs
# In Rstudio, points only appear after finishing.
locatorRS(7, col="blue", type="o") # plots after each click
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.