Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不手动指定颜色的情况下为 ggplot2(类似于“theme_bw”)为 ggplot2 设置黑色/灰色/深色配色方案?即有类似的东西:
ggplot(mtcars) + geom_boxplot(aes(factor(cyl), mpg, fill=factor(gear)))
生成黑色/灰色箱线图(像往常一样在该比例下等距)而不是红色/绿色/蓝色?
谢谢。
尝试这个:
last_plot() + scale_fill_grey()