How to create geom_boxplot with large amount of continuous x-variables
I have a data frame which contains x-axis numeric bins and continuous y-axis data across multiple categories. Initially, I created a boxplot by making the x-axis bins "factors", and doing a boxplot of the melted data. Reproducible data: x <- seq(1,10,by=1) y1 <- rnorm(10, mean=3) y2 <- rnorm(10, mean=10) y3<- rnorm(10, mean=1) y4<- rnorm(10, mean=8) y5<- rnorm(10, mean=12) df <- data.frame(x,y1,y2,y3,y4,y5) df.m <- melt(df, id="x") My code to create the x-axis data as a factor: df.m$x <- as.factor(df.m$x) My ggplot: ggplot(df.m, aes(x=x, y=value))+ geom_boxplot(notch=FALSE, outlier.shape=NA,