Re: [R] How to display multiples lines with different color on the same plot?

2013-06-05 Thread Rui Barradas
Hello, See the help pages for ?abline ?par # parameter 'col' Hope this helps, Rui Barradas Em 04-06-2013 22:05, Kaptue Tchuente, Armel escreveu: Hi all, I'm struggling with the display of several regression lines (with different colors) on the same plot. I manually drew what I'm trying

Re: [R] How to display multiples lines with different color on the same plot?

2013-06-05 Thread David Winsemius
On Jun 4, 2013, at 3:05 PM, Kaptue Tchuente, Armel wrote: Hi all, I'm struggling with the display of several regression lines (with different colors) on the same plot. I manually drew what I'm trying to do with 8 lines (see attached). If you want lines that only span a portion of a plot

Re: [R] How to display multiples lines with different color on the same plot?

2013-06-05 Thread John Kane
Try: library(ggplot2) ggplot(mtcars, aes(mpg, qsec, colour = as.factor(gear))) + geom_point() + geom_smooth(method = lm, se = FALSE) You probably will have to melt your data to get into the right format. John Kane Kingston ON Canada -Original Message- From: armel.kap...@sdstate.edu

[R] How to display multiples lines with different color on the same plot?

2013-06-04 Thread Kaptue Tchuente, Armel
Hi all, I'm struggling with the display of several regression lines (with different colors) on the same plot. I manually drew what I'm trying to do with 8 lines (see attached). Any thoughts for a code will be very much appreciated. Thanks Armel attachment: