library(ggplot2)
data(algae, package="DMwR2")
## Plot on the left (standard)
freqOcc <- table(algae$season)
freqOcc
## 
## autumn spring summer winter 
##     40     53     45     62
barplot(freqOcc,main='Frequency of the Seasons')

## Plot on the right (ggplot2)
ggplot(algae,  aes(x=season) ) + geom_bar() + ggtitle("Frequency of the Seasons")

ggplot(algae,aes(x=season)) + geom_bar() +
 coord_flip()  + ggtitle("Frequency of the Seasons") 

library(ggplot2)
data(iris)
## Plot on the left (standard)
hist( iris$Petal.Length, xlab='Petal Length')

## Plot on the right (ggplot2)
ggplot(iris, aes(x=Petal.Length)) + geom_histogram() + xlab("Petal Length")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

library(ggplot2)
data(iris)
## Plot on the left (standard)
boxplot( iris$Sepal.Width, ylab='Sepal Width')

## Plot on the right (ggplot2)
ggplot( iris, aes( x = factor(0), y=Sepal.Width)) + geom_boxplot() +
   xlab("") + ylab("Sepal Width") + theme(axis.text.x=element_blank())