we <- c(55,60,70,75,75)

we2 <- c(155,160,170,175,175)

mean(we)      #平均數
## [1] 67
plot(we,we2,
     pch = 17,
     col= "skyblue",
     main ="班上的體重與身高",
     xlab ="體重",
     ylab ="身高")

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

# Load ggplot2
library(ggplot2)

# Create data
data <- data.frame(
  name=c("A","B","C","D","E") ,  
  value=c(3,12,5,18,45)
  )

# Barplot
ggplot(data, aes(x=name, y=value)) + 
  geom_bar(stat = "identity")

data<- c(50,23,35,48)
labels <- c("英文系","法文系","德文","翻譯")

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