1

I try to plot using

ggplot2

However I receive this error:

Error in ggproto(NULL, super, call = match.call(), aesthetics = aesthetics,  : 
  argument "values" is missing, with no default

Here the data of ploting

  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?
0

1 Answer 1

2

You made a typo:

replace

scale_fill_manual(value = c("purple", "blue"))

with

scale_fill_manual(values = c("purple", "blue"))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.