stat_stars | R Documentation |
Create a star plot by drawing segments from group centroid to each points.
stat_stars( mapping = NULL, data = NULL, geom = "segment", position = "identity", 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 |
geom |
The geometric object to use to display the data, either as a
|
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
na.rm |
If FALSE (the default), removes missing values with a warning. If TRUE silently removes missing values. |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
other arguments to pass to |
ggscatter
# Load data data("mtcars") df <- mtcars df$cyl <- as.factor(df$cyl) # Scatter plot with ellipses and group mean points ggscatter(df, x = "wt", y = "mpg", color = "cyl", shape = "cyl", mean.point = TRUE, ellipse = TRUE)+ stat_stars(aes(color = cyl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.