Skip to contents

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.

Examples

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