plot.umapscan: Plot an umapscan object

Description Usage Arguments Examples

View source: R/umapscan.R

Description

Plot an umapscan object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class '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

1
2
3
4
5
6
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)

juba/umapscan documentation built on Aug. 29, 2020, 7:31 a.m.