My data looks like in the following way-
Months | Counts |
---|---|
MAR | 3055 |
DEC | 8269 |
JAN | 1012 |
FEB | 2740 |
MAR | 1888 |
OCT | 5116 |
NOV | 5614 |
DEC | 5192 |
JAN | 3172 |
FEB | 5476 |
MAR | 2881 |
OCT | 979 |
NOV | 2090 |
DEC | 1148 |
JAN | 735 |
FEB | 3763 |
MAR | 3027 |
For the above data set, I wanted to look the spread of the data by boxplots. I used basic R plots and ggplots.
SUR_MONTHS <- read.csv("F:/SUR_MONTHS.csv")
SUR_MONTHS$Months <- factor(SUR_MONTHS$Months , levels=c("OCT", "NOV", "DEC", "JAN", "FEB", "MAR"))
boxplot(SUR_MONTHS$Counts ~ SUR_MONTHS$Months , ylab="Counts" ,
xlab="Months of the winter season")
Again, for the same datasheet I used the ggplots
library(ggplot2)
SUR_MONTHS$Months <- factor(SUR_MONTHS$Months)
my.bp <<-ggplot(data=SUR_MONTHS, aes(y= Counts, x=Months, fill=Months ))
my.bp <- my.bp + geom_boxplot()
my.bp <- my.bp + ylab("Counts of Species") + xlab("Months")
my.bp
So, my confusion is why the graphs looks different for the same data sheet? Could anyone help me to figure out my mistakes?