【发布时间】:2016-11-10 08:53:13
【问题描述】:
我有下面给出的代码
d = data.frame(sites=rep(paste("S", 1:31),each=12),
value=runif(31*12),
panel=c(rep("Group 1",16*12), rep("Group 2", 12*12),
rep("Group 3", 3*12)))
ggplot(d, aes(x = sites, y = factor(0))) +
geom_tile(aes(fill = value)) +
scale_fill_gradient(low = "green", high = "blue") +
facet_wrap(~ panel, ncol = 1)
现在,我想要为每组单独的渐变比例,而不是单一比例。
【问题讨论】:
-
同种颜色显示不同比例的原因是什么?