as.geom: as.geom function

as.geomR Documentation

as.geom function

Description

Converts a ggdiagram shape to a ggplot2 geom

Usage

as.geom(x, ...)

Arguments

x

a shape

...

<dynamic-dots> Pass arguments to ggplot2::geom_point

Details

Usually the as.geom function is not necessary to call explicitly because it is called whenever a ggdiagram shape is added to a ggplot. However, in complex situations (e.g., making a function that assembles many objects), it is sometimes necessary to make the call explicitly.

Value

geom

Examples

library(ggplot2)
c1 <- ob_circle(radius = 3)
ggplot() +
  as.geom(c1, fill = "black") +
  coord_equal()


ggdiagram documentation built on Sept. 15, 2025, 1:07 a.m.