Membuat Pie Chart

korban <- c(10,12,4,16,8)
negara <- c("US","UK","Australia","Germany","France")
persen <- round((korban/sum(korban))*100)
label <- paste(negara, persen, "%") 
pie(korban, labels = label, col = rainbow(length(label)),
    main = "Pie Chart Korban Tsunami")

Membuat Bar Plot

barplot(korban, col = "red", main = "Barplot Korban Tsunami", names.arg = negara)

Diagram Titik (Dot Plot)

data("mtcars")
dotchart(mtcars$mpg, cex = .7, main = "Gas Milage for Car Model",
         xlab = "Milage per Gallon")

Stem and Leaf Plot

stem(mtcars$mpg, scale = 2)
## 
##   The decimal point is at the |
## 
##   10 | 44
##   12 | 3
##   14 | 3702258
##   16 | 438
##   18 | 17227
##   20 | 00445
##   22 | 88
##   24 | 4
##   26 | 03
##   28 | 
##   30 | 44
##   32 | 49

Histogram

hist(mtcars$mpg, breaks = 9, main = "Histogram Gas Milage for Car Model",
     col = "blue", xlab = "Milage per Gallon")