geom_star {ggstar} | R Documentation |
Star layer
Description
geom_star provides the multiple geometric shape to create scatter plot or other point plot, it is like the 'geom_point' of 'ggplot2'. Note: the 'left-triangle' (17, 19) and 'right-triangle' (18, 20) are developed to plot the 'triangle-heatmap'. Their centers are not in their internal, but the center of hypotenuse.
Usage
geom_star(
mapping = NULL,
data = NULL,
na.rm = FALSE,
stat = "identity",
position = "identity",
show.legend = NA,
inherit.aes = TRUE,
...
)
Arguments
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
na.rm |
If 'FALSE', the default, missing values are removed with a warning. If 'TRUE', missing values are silently removed. |
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. |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Other arguments passed on to |
Details
-
starshape
the shape of point, default is 1 (star shape). -
starstroke
control the thickness of margin of point, default is 0.5. -
size
the size of point, default is 1.5. -
colour
the colour of margin, default is 'black'. -
fill
the colour of fill, default is NA. -
alpha
the transparency of fill, default is 1. -
angle
control the angle of rotation of point, default is 0. -
subset
subset the data frame which meet conditions to display.
Value
polygonal point layer
Aesthetics
geom_star()
understands the following aesthetics (required aesthetics are in bold):
-
x
-
y
-
alpha
-
angle
-
colour
-
fill
-
group
-
phase
-
size
-
starshape
-
starstroke
-
subset
Learn more about setting these aesthetics in vignette("ggplot2-specs")
.
Author(s)
Shuangbin Xu
Examples
library(ggplot2)
p <- ggplot(iris, aes(x=Sepal.Length,
y=Sepal.Width,
starshape=Species)) +
geom_star(size=4)
p