library(ggplot2) # 准备数据集 df <- data.frame( value = c(10, 15, 12, 8, 20, 18), group = c("A", "A", "B", "B", "C", "C") ) # 创建分组柱状图 ggplot(df, aes(x = group, y = value)) + geom_bar(stat = "summary", fun = "mean", fill = "steelblue") + lab...