#0301  課堂測驗
# 亞洲四小龍(Four Asian Tigers)====
# https://zh.wikipedia.org/wiki/%E4%BA%9A%E6%B4%B2%E5%9B%9B%E5%B0%8F%E9%BE%99
#建立資料
nation <- c("Korea","Taiwan","Hong kong","Singapore")
growth <- c(0.36,0.28,0.83,1.4)
#合併nation和growth為data frame
data <- data.frame(nation,growth)
#畫長條圖
barplot(sort(data$growth, decreasing = T),#要畫圖的向量資料
        main = "Four Asian Tigers", #大標題
        sub = "by 曾筠修", #次標題
        names.arg =  c("Korea","Taiwan","Hong kong","Singapore"), #資料名稱
        xlab = "name", #x軸標籤
        ylab = "growth", #y軸標籤
        col = c(61:45))