首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >图形绘制中的缺失值

图形绘制中的缺失值
EN

Stack Overflow用户
提问于 2018-03-31 14:23:13
回答 1查看 487关注 0票数 1

我试着用

代码语言:javascript
复制
ggplot2

但是,我收到了这个错误:

代码语言:javascript
复制
Error in ggproto(NULL, super, call = match.call(), aesthetics = aesthetics,  : 
  argument "values" is missing, with no default

这里是绘图的数据

代码语言:javascript
复制
  IND1 <- c(3.422 -0.11708, -0.58419, NA, -2.40179, 0.26907, -2.30089, NA, NA)
   Dep <- c("D1","D2","D3","D4","D5","D6","D7","D8")
dd <- data.frame(Dep, IND1)   
library(ggplot2)
ggplot(dd, aes(x = Dep, y = IND1, fill = (IND1 > 0))) +
    geom_col() +
    scale_fill_manual(value = c("purple", "blue")) +
    coord_flip()
I think it has to do with NA I have. Is there anything I can?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-31 14:39:07

你犯了个错误:

替换

代码语言:javascript
复制
scale_fill_manual(value = c("purple", "blue"))

使用

代码语言:javascript
复制
scale_fill_manual(values = c("purple", "blue"))
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49588774

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档