geom_shaping | R Documentation |
It can be used to draw custom marker on ggplot.
geom_shaping(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
width_unit = "native",
height_unit = width_unit,
rasterize = FALSE,
res = 100,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this
layer, either as a |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
width_unit, height_unit |
units of width or height. |
rasterize |
logical, whether to convert raster image before drawing. |
res |
positive numeric, used to set the resolution of raster. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_shaping()
understands the following aesthetics (required aesthetics are in bold):
x
y
marker
width
height
angle
hjust
vjust
n
r
ratio
colour
fill
alpha
size
linetype
Hou Yun
## Not run:
set_corrplot_style()
## heart marker
qcorrplot(mtcars) + geom_shaping(marker = marker("heart"))
## square marker
qcorrplot(mtcars) + geom_shaping(marker = marker("square"))
## ellipse marker
qcorrplot(mtcars) + geom_shaping(marker = marker("ellipse"))
## square and shade marker
qcorrplot(mtcars) +
geom_shaping(marker = marker("square")) +
geom_shaping(aes(angle = ifelse(r > 0, 0, 180)), marker = marker("shade"),
colour = "white", size = 0.3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.