#activate the package library(ggplot2) #load the dataframe ID <- 1:400 values <- c(rnorm(200, mean=50, sd=22), rnorm(200, mean=20, sd=10)) class <- c(rep("first", 200), rep("second",200)) my.dataframe <- data.frame(ID, values, class) #jitter plot ggplot(my.dataframe, aes(class, values)) + geom_jitter() #jitter plot narrow ggplot(my.dataframe, aes(class, values)) + geom_jitter(width=.1) #jitter plot too narrow ggplot(my.dataframe, aes(class, values)) + geom_jitter(width=.01) #point plot ggplot(my.dataframe, aes(class, values)) + geom_point() #jitter plot with qplot)() qplot(class, values, data=my.dataframe, geom="jitter")