I have the following example:
data <- structure(list(a = c(-1.25549186262767, -0.840855480786298, - 0.635371312524283, -0.602907981454667, -0.472166385166945, -0.285773634866154, 0.0701427664273268, 0.138108224803923, 1.38435934347858, 1.71144087270237), b = c(-3.44400412039417, 0.675644682353751, -1.04793816522475, -7.38303347186651, 2.34519166466874, 0.334780748573386, 4.76806919070976, 4.8633533150074, 3.50106026731172, -1.27172351054143), c = c(-3.02376206439776, -2.56390769080574, -1.48659913867609, -1.27976202274701, -0.368725655874139, 1.08537150160227, 3.98619381956471, 4.50687017428731, 4.10341582203292, -1.61769414438858 ), d = c(5.71851494232005, 2.90539833491649, 2.75195159216204, 2.73478241733301, 2.65941820902101, 2.60630235726839, 3.34836154776286, 3.62938300664006, 4.61153521538016, 5.56230567213863), e = c(8.98703236551896, 4.5660296657415, 4.32487774825464, 4.29789523068949, 4.17945528847841, 4.09598014088541, 5.26217626511884, 5.70382046327322, 7.24733897758039, 8.74153894964533)), .Names = c("a", "b", "c", "d", "e"), row.names = c(NA, -10L), class = "data.frame") ggplot(data, aes(x=a, y=b)) + geom_point() + geom_line(aes(x=a, y=c)) + geom_line(aes(x=a, y=(c - d), colour="red")) + geom_line(aes(x=a, y=(c + d), colour="red")) + geom_line(aes(x=a, y=(c - e), colour="blue")) + geom_line(aes(x=a, y=(c + e), colour="blue"))
I want the labels to be "d" and "e", but instead they are assigned the value of the "color" field. Two questions:
1) How can I completely rule out a legend? 2) If I want to include a legend, how can I set it for certain values, and not for color?