| geom_star | R Documentation |
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.
geom_star(
mapping = NULL,
data = NULL,
na.rm = FALSE,
stat = "identity",
position = "identity",
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 |
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.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Other arguments passed on to |
Aesthetics geom_star understands the following aesthetics. Required
aesthetics are displayed in bold and defaults are displayed for optional aesthetics:
x.
y.
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.
polygonal point layer
Shuangbin Xu
library(ggplot2)
p <- ggplot(iris, aes(x=Sepal.Length,
y=Sepal.Width,
starshape=Species)) +
geom_star(size=4)
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.