data(sat.act)
with(sat.act,scatterHist(SATV,SATQ))
scatterHist(SATV ~ SATQ,data=sat.act) #formula input
#or for something a bit more splashy
scatterHist(sat.act[5:6],pch=(19+sat.act$gender),col=c("blue","red")[sat.act$gender],grid=TRUE)
#better yet
scatterHist(SATV ~ SATQ + gender,data=sat.act) #formula input with a grouping variable
#If using a factor for grouping, we must first convert it to numeric
iris.1 <- char2numeric(iris,flag=FALSE)
scatterHist(Sepal.Width ~ Petal.Length + Species,data=iris.1, show.d=FALSE,
main="Fisher's Iris example") #see pairs.panels
Run the code above in your browser using DataLab