dimred_encircle_add: Add encircling to ggplot

View source: R/plot_dimred_encircle.R

dimred_encircle_addR Documentation

Add encircling to ggplot

Description

Encircle by Kernel Density Estimate contours

Usage

dimred_encircle_add(
  data,
  dim1 = 1,
  dim2 = 2,
  color_by = NULL,
  colors = NULL,
  size = 1,
  alpha = 0,
  line_alpha = 0.5,
  linetype = "solid",
  show_legend = FALSE,
  rescale = TRUE,
  borderline = FALSE,
  borderline_color = alpha("black", 0.5),
  ...
)

Arguments

data

matrix or data.frame containing dimensions and grouping parameters. All columns that are not given as dim1 or dim2 (see below), will be used in grouping the resulting KDE contour.

dim1

column position or column name of the first dimension in 'data'

dim2

column position or column name of the second dimension in 'data'

color_by

column position or column name for coloring the geom_path

size

Line size for geom_polygon

alpha

Alpha for geom_polygon

line_alpha

Alpha for line of geom_polygon

linetype

Line type for geom_polygon

show_legend

Should legend be drawn?

rescale

Should scales be adjusted to make sure contours are complete? This will override previous scale_x_ and scale_y_.

borderline

Should line have a border?

borderline_color

If borderline=TRUE, what color should be used for border?

...

Passed on to scutility::dimred_encircle_groups()

Value

list of ggplot elements


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.