| geom_circle_cm {plothelper} | R Documentation |
Geom Layer for Circle with Absolute Size
Description
This layer uses centimeter as unit to draw circles so
that the size and shape will not be influenced by
the change of the coordinate systems
(even when a polar system is used).
Note: this function does not have
linetype and n arguments.
Usage
geom_circle_cm(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
linetype = NULL,
...
)
Arguments
mapping |
aes mapping. |
data |
data. |
stat |
stat. |
position |
position. |
na.rm |
logical, whether to remove NA values. |
show.legend |
whether to show legend. |
inherit.aes |
logical, whether to inherit aes from ggplot(). |
linetype |
should always be NULL. because it will not be used. |
... |
additional parameters. |
Details
Accepted properties are:
(1)
rcmradius in centimeter.(2)
colorcolor of the outline.(3)
fillcolor inside the shape.(4)
alphaalpha of color and fill.(5)
sizeline width of the outline.(6)
xx coordinates of the middle points.(7)
yy coordinates of the middle points.
Examples
library(ggplot2)
dat=data.frame(x=1: 10, y=rep(5, 10), R=rep(c(0.5, 1), 5))
ggplot(dat)+xlim(0, 11)+ylim(1, 9)+
geom_circle_cm(aes(x=x, y=y, fill=factor(R)), rcm=dat$R, alpha=0.5)
[Package plothelper version 0.1.9 Index]