add_ellipse: Add ellipse

View source: R/add-misc.R

add_ellipseR Documentation

Add ellipse

Description

Add ellipse

Usage

add_ellipse(plot, ...)

Arguments

plot

A tidyplot generated with the function tidyplot().

...

Arguments passed on to ggplot2::stat_ellipse().

Value

A tidyplot object.

Examples

pca |>
  tidyplot(x = pc1, y = pc2, color = group) |>
  add_data_points() |>
  add_ellipse()

pca |>
  tidyplot(x = pc1, y = pc2, color = group) |>
  add_data_points() |>
  add_ellipse(level = 0.75)

pca |>
  tidyplot(x = pc1, y = pc2, color = group) |>
  add_data_points() |>
  add_ellipse(type = "norm")


tidyplots documentation built on Jan. 8, 2026, 9:07 a.m.