【发布时间】:2020-07-18 11:24:26
【问题描述】:
我不喜欢下面代码生成的图表中的颜色。
如何调整代码以更改图表中使用的颜色数组?
ggplot(Rating, aes(x = Function, y = Freq, fill = Rating)) +
ggtitle("Test") +
labs(x="Function", y = "Rating") +
geom_col() +
theme_bw()
【问题讨论】:
-
您好,杰德,欢迎来到 SO。如果您提供minimal, reproducible example,您肯定会吸引更多人来查看您的问题。您会在很多地方找到问题的解决方案,其中一个可能是here
-
您可能会发现查看
scale_fill_*()函数很有用,例如scale_fill_distiller()。
标签: r ggplot2 graph charts colors