Re: [R] Adding additional points to ggplot2

2013-08-19 Thread Chris89
That worked great! Best regards, Chris -- View this message in context: http://r.789695.n4.nabble.com/Adding-additional-points-to-ggplot2-tp4673928p4674059.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

Re: [R] Adding additional points to ggplot2

2013-08-16 Thread zelfortin
Hi, you could also use a factor variable to differentiate your observed and estimated values and change shape and/or color based on that factor. e.g. ggplot(aes(x=X,y=Y, shape=factor(Type))) + geom_point() #For changing shapes ggplot(aes(x=X,y=Y, color=factor(Type))) + geom_point()

Re: [R] Adding additional points to ggplot2

2013-08-16 Thread Ista Zahn
Hi Chris, Just add a second geom_point() call and override the y axis mapping. For example: library(ggplot2) ggplot(mtcars, aes(x=hp, y=mpg)) + geom_point() + geom_point(aes(y=qsec), color="red") Best, Ista On Fri, Aug 16, 2013 at 5:45 AM, Chris89 wrote: > Hi! > I am having a difficulty ad

[R] Adding additional points to ggplot2

2013-08-16 Thread Chris89
Hi! I am having a difficulty adding additional points to a plot using ggplot2.. The case is that I want to plot both original and estimated values in the same graph, and general I would use plot and then lines, but I do not know how to do it with ggplot... Thanks! Regards, Chris -- View this