I am new at this. The two data sets don't have color variable just paired data. How should I structure the data sets in R? Joe Ricci
________________________________ From: William Revelle [via R] <ml-node+s789695n3871355...@n4.nabble.com> To: Joe Ricci Sent: Tue Oct 04 11:18:20 2011 Subject: Re: how do i put two scatterplots on same graph If the data are from one data.frame (e.g., the iris data set), then simply label the red and white flowers with different colors: e.g., with the iris data set plot(iris$Sepal.Length,iris$Sepal.Width,col=c("red","blue","black")[iris$Species],pch=c(16:18)[iris$Species]) Bill On Oct 4, 2011, at 4:20 AM, Paul Hiemstra wrote: > On 10/04/2011 06:19 AM, jricci wrote: >> Have two sets of scatterplot data >> hypothetically >> a) stem lenght vs number of petals in red flowers >> b) stem lenght vs number of petals in white flowers >> >> want to place on same scatter plot with same x,y axis but different collored >> markers >> >> How do I do this in R >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/how-do-i-put-two-scatterplots-on-same-graph-tp3870030p3870030.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> [hidden email]</user/SendEmail.jtp?type=node&node=3871355&i=0> mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > Hi, > > You could take a look at the ggplot2 package. > > good luck, > Paul > > -- > Paul Hiemstra, Ph.D. > Global Climate Division > Royal Netherlands Meteorological Institute (KNMI) > Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 > P.O. Box 201 | 3730 AE | De Bilt > tel: +31 30 2206 494 > > http://intamap.geo.uu.nl/~paul > http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770 > > ______________________________________________ > [hidden email]</user/SendEmail.jtp?type=node&node=3871355&i=1> mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 6 minutes to midnight http://www.thebulletin.org ______________________________________________ [hidden email]</user/SendEmail.jtp?type=node&node=3871355&i=2> mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ________________________________ If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/how-do-i-put-two-scatterplots-on-same-graph-tp3870030p3871355.html To unsubscribe from how do i put two scatterplots on same graph, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3870030&code=anJpY2NpQGNvcmNhcmUubmV0fDM4NzAwMzB8MTA4MDIwNzkxOA==>. -- View this message in context: http://r.789695.n4.nabble.com/how-do-i-put-two-scatterplots-on-same-graph-tp3870030p3872293.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.