weight <- c(50,55,60,54,67,57,52)

high <- c(150,160,179,175,150,159,165)


water<- c(1,2,3,4,5,6,7)
plot(weight,high,
     pch=16,
     col="#081F5C",
     xlab="體重",
     ylab="身高",
     main="班級的身高體重")

library(ggplot2)
data <- data.frame(
  種類=c("兔子","松鼠","熊","貓","鴨子") ,  
  數量=c(17,13,15,20,35)
  )

ggplot(data, aes(x=種類, y=數量)) + 
  geom_bar(stat = "identity") +
  coord_flip()

hist(high,
     col= "#334EAC",
     main ="班上的體重與身高",
     xlab ="體重",
     ylab ="次數")

data<- c(33,23,57,11)
labels <- c("足球","排球","籃球","游泳")

pie(data,labels,main ="學生喜歡的運動比例", col=heat.colors(length(data)))