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)
rcm
radius in centimeter.(2)
color
color of the outline.(3)
fill
color inside the shape.(4)
alpha
alpha of color and fill.(5)
size
line width of the outline.(6)
x
x coordinates of the middle points.(7)
y
y 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]