r - 向gglot添加填充颜色
问题描述
目标:我正在尝试将填充颜色添加到我的列车。
当前尝试:备忘单中的方法显示了函数 scale_fill_manual(values = c("","","")) 或 scale_fill_brewer(palette = "Greens")。这两种选择都没有奏效。
library(ggplot2)
library(tidyverse)
library(RColorBrewer)
d <- ggplot(dataset3, aes(x = DropoffLocationName, y=Difference)) + geom_col() + theme_test()
d + scale_fill_manual(values = c("Red","Orange","Yellow","Green","Blue","Purple"))
d + scale_fill_brewer(palette = "Greens")
那么,有什么想法吗?
解决方案
推荐阅读
- reactjs - 如何为材质 UI 多选和简单选择组件编写测试用例
- html - 如何在 Angular 中隐藏图表或 div 的一部分?
- amazon-web-services - 从 AWS 服务限制中查询活动 vCPU 使用情况
- arrays - 二维数组为循环赋值
- android - 基于多对多关系的查询条件
- ruby-on-rails - 即使外键有效,Rails belongs_to 也会返回 nil
- c# - 插入时 SQL Server 触发器
- c# - .Net Core 3.1 SignalR 使用客户端证书进行授权
- kubernetes - Kubernetes 部署
- go - 防止beego中的SQL注入