
Last chance! 50% off unlimited learning
Sale ends in
Select points on a scatterplot and get information about them
FeatureLocator(plot, data.plot, ...)
A ggplot2 plot
The oridinal data that went into the ggplot2 plot
Extra parameters, such as dark.theme, recolor, or smooth for using a dark theme, recoloring based on selected cells, or using a smooth scatterplot, respectively
The names of the points selected
locator
ggplot2::ggplot_build
# NOT RUN {
df <- data.frame(x = rnorm(n = 100, mean = 20, sd = 2), y = rbinom(n = 100, size = 100, prob = 0.2))
p <- ggplot(data = df, mapping = aes(x = x, y = y)) + geom_point(mapping = aes(color = 'red'))
FeatureLocator(plot = p, data.plot = df)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab