小提琴图
载入R包。
library(ggplot2)
ggplot(iris, aes(x = Species, y = Sepal.Length)) +
geom_violin()
ggplot(iris1, aes(x = Species, y = Sepal.Length, colour = Species)) +
geom_violin(size = 1, trim = FALSE) +
scale_colour_manual(values = c("steelblue", "orange", "firebrick")) +
theme_bw() +
theme(legend.position = "none")
2023-02-22 16:10