weight <- c(50,55,63,55,67,43,52)

high <- c(150,160,170,175,150,153,165)

plot(weight,high,
     pch=15,
     col="#00CACA",
     xlab="體重",
     ylab="身高",
     main="班級的身高體重")

# Load ggplot2
library(ggplot2)

# Create data
data <- data.frame(
  名字=c("大明","B","C","D","E") ,  
  尺寸=c(3,12,5,18,45)
  )

# Barplot
ggplot(data, aes(x=名字, y=尺寸)) + 
  geom_bar(stat = "identity") +
  coord_flip()

hist(weight,
     col= "blue",
     main ="班上的體重與身高",
     xlab ="體重",
     ylab ="次數")

人數<- c(50,23,38,48)
labels <- c("A班","B班","C班","D班")

pie(人數,labels,main ="學生的比例", col=cm.colors(length(人數)))