I have a dataset "test". I try to produce a "green" arrow but it gives a
"red" arrow (as attached). Could someone tell me how I can fix it? Thanks,

> test
        date    co       y1       y2
5 2011-11-28 green 196.6559 1.600267
> dput(test)
structure(list(date = structure(15306, class = "Date"), co = "green",
    y1 = 196.655872, y2 = 1.600267), .Names = c("date", "co",
"y1", "y2"), class = "data.frame", row.names = 5L)
> ggplot()+    geom_segment(mapping = aes(x = as.Date(test[,"date"]), y =
y1, xend = as.Date(test[,"date"]), yend = y2, color=co), data=test,

Attachment: test_plot1609.pdf
Description: Adobe PDF document

R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to