# NOT RUN {
# 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))
# }
Run the code above in your browser using DataLab