Plot an umapscan object

# S3 method for umapscan
plot(
  x,
  color,
  palette,
  label = NULL,
  ellipses = FALSE,
  alpha = 0.2,
  fixed = FALSE,
  ...
)

Arguments

x

umapscan object to be plotted

color

variable to highlight points (tidylang style). Must be a variable of the data or data_sup elements of us

palette

viridis (for continuous color) or brewer (for categorical color) palette name

label

legend label

ellipses

if TRUE and color is categorical, add repartition ellipses

alpha

points transparency

fixed

if TRUE, add ggplot2::coord_fixed() to plot

...

arguments passed to other methods

Examples

library(dplyr) iris_num <- iris %>% select_if(is.numeric) iris_sup <- iris %>% select(Species) us <- new_umapscan(iris_num, data_sup = iris_sup, n_neighbors = 25, min_dist = 0.1) plot(us, color = Species, ellipses = TRUE)
plot(us, color = Sepal.Width, palette = "viridis", alpha = 0.5, fixed = TRUE)