Skip to contents

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")