# Create some data and grouping
set.seed(1)
x <- rnorm(28)
g <- rep(1:2, 14)
# Dot plot with groups and no stacking
dotPlot(x, group = g, stacked = FALSE, pch = c(19, 20), main = "Non stacked dot plot")
# Dot plot with groups and stacking
dotPlot(x, group = g, stacked = TRUE, pch = c(19, 20), main = "Stacked dot plot")
Run the code above in your browser using DataLab