r - ggplot failing to plot the correct color -


ggplot2 seems have gone haywire in machine. no matter color specify, seems print lines in red! example, following code prints plot in red (image attached).

df <- data.frame(   date = seq(sys.date(), len=100, by="1 day")[sample(100, 50)],   price = runif(50) ) df <- df[order(df$date), ]  dt <- qplot(date, price, data=df, geom="line", color="blue") dt 

enter image description here

what wrong?

replace colour = "blue" instead:

colour = i("blue") 

as @joran rightly mentions, it's better way instead:

ggplot(data=df, aes(date, price)) + geom_line(color="blue") 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -