📜  带年龄组的堆积条形图 r - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:58.213000             🧑  作者: Mango

代码示例1
data$group <- cut(data$Age, breaks = c(30,33,36,39), labels = c("30-33","33-36","36-39"), right = TRUE)
ggplot(data, aes(x = group, fill = Gender)) + 
  geom_bar()