【发布时间】:2016-05-21 16:22:41
【问题描述】:
使用ggplot2很容易创建堆叠直方图:
library(ggplot2)
ggplot(data = iris, aes(x = Sepal.Length, fill = Species)) +
geom_histogram(colour = 'white')
ggplot(data = iris, aes(x = Sepal.Length, fill = Species)) +
geom_histogram(colour = 'white', position = 'fill')
我想知道如何仅使用 R 基础图形来创建两个直方图。
【问题讨论】: