as.geom | R Documentation |
Converts a ggdiagram shape to a ggplot2 geom
as.geom(x, ...)
x |
a shape |
... |
< |
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.
geom
library(ggplot2)
c1 <- ob_circle(radius = 3)
ggplot() +
as.geom(c1, fill = "black") +
coord_equal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.