#activate the package library(ggplot2) #load the dataframe ID <- 1:60 values <- c(rnorm(20, mean=50, sd=22), rnorm(20, mean=20, sd=10), rnorm(20, mean=35, sd=5)) class <- c(rep("first", 20), rep("second",20), rep("third",20)) my.dataframe <- data.frame(ID, values, class) #boxplot with 2 categories ggplot(my.dataframe, aes(class,values)) + geom_point() qplot(class, values, data=my.dataframe, geom=("point"))