stripchart(gpa ~ class, data = Undergrad, method = "stack", 
col = c("blue","red","green","lightblue"),
pch = 19, main = "GPA versus Class")
stripchart(gpa ~ gender, data = Undergrad, method = "stack", 
           col = c("red", "blue"), pch = 19,
           main = "GPA versus Gender")
           stripchart(sat ~ drops, data = Undergrad, method = "stack", 
           col = c("blue", "red", "green", "lightblue"),
           pch = 19, main = "SAT versus Drops")
stripchart(drops ~ gender, data = Undergrad, method = "stack", 
           col = c("red", "blue"), pch = 19, main = "Drops versus Gender")
 if (FALSE) {
 library(ggplot2)
 ggplot2::ggplot(data = Undergrad, aes(x = sat, y = drops, fill = factor(drops))) + 
            facet_grid(drops ~.) +
            geom_dotplot() +
            guides(fill = FALSE)
}
Run the code above in your browser using DataLab