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
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
Post a Comment