# Create data for the graph.
x <- c(11, 30, 39, 20)
labels <- c("70後", "80後", "90後", "00後")
# Plot the chart with title and rainbow color pallet.
pie(x, labels, main = "出生年齡段 - 餅狀圖", col = rainbow(length(x)))

data<- c(50,23,35,48)
labels <- c("英文系","法文系","德文系","翻譯系")
pie(data,labels,main ="學生的比例", col=heat.colors(length(data)))

we <- c(55,60,70,75,75)
we2 <- c(155,160,170,175,175)
mean(we)
## [1] 67
median(we)
## [1] 70
plot(we,we2,
pch = 17,
col= "skyblue",
main ="班上的體重與身高",
xlab ="體重",
ylab ="身高")

stem(we)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 5 | 5
## 6 | 0
## 6 |
## 7 | 0
## 7 | 55