【发布时间】:2015-01-19 05:29:47
【问题描述】:
我已经订购了我想在其上使用 color brewer 的分类数据。但是我很难看到非常轻的较低值。有没有办法修剪掉那些较低的值或设置比例的下限?
ggplot(data.frame(x=1:6, y=10:15, w=letters[1:6]), aes(x, y, color=w)) +
geom_point()+ scale_color_brewer(type="seq", palette=1) + theme_bw()
有没有更好的方法来做到这一点?到目前为止,我要么看到没有排序的定性尺度,要么看到不喜欢应用于离散数据的连续尺度。如果这是唯一的路线,我知道手动秤。
【问题讨论】:
-
一个简单的可能替代方法是使用在填充区域周围有轮廓的绘图符号,例如
pch = 21(参见例如here)。然后你可以改用fillaesthetic。ggplot(data.frame(x = 1:6, y = 10:15, w = letters[1:6]), aes(x, y, fill = w)) + geom_point(pch = 21,size = 5)+ scale_fill_brewer(type = "seq", palette = 1) + theme_bw()
标签: r ggplot2 colorbrewer