geom_encircle_vivi: Automatically enclose points in a polygon

View source: R/geom_encircle.R

geom_encircle_viviR Documentation

Automatically enclose points in a polygon

Description

Automatically enclose points in a polygon

Usage

geom_encircle_vivi(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

mapping

data

data

stat

stat

position

position

na.rm

na.rm

show.legend

show.legend

inherit.aes

inherit.aes

...

dots

Details

This function adds a polygon around a set of points, to highlight them.

Value

adds a circle around the specified points

Examples

library(ggplot2)
d <- data.frame(x=c(1,1,2),y=c(1,2,2)*100)

gg <- ggplot2::ggplot(d,aes(x,y))
gg <- gg + scale_x_continuous(expand=c(0.5,1))
gg <- gg + scale_y_continuous(expand=c(0.5,1))

gg + geom_encircle_vivi(s_shape=1, expand=0) + geom_point()

gg + geom_encircle_vivi(s_shape=1, expand=0.1, colour="red") + geom_point()

vivid documentation built on Aug. 24, 2025, 1:09 a.m.