Skip to content
Prev 273305 / 398506 Next

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:

            
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