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

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

plot(statistic,Math,
     pch=15,
     col="#00CACA",
     xlab="statistic",
     ylab="Math",
     main="班級的成績")

hist(statistic,
     col= "blue",
     main ="班上的成績",
     xlab ="成績",
     ylab ="次數")

# Load ggplot2
library(ggplot2)

# Create data
data <- data.frame(
  社團種類=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動") ,  
  次數=c(185,82,32,28,25)
  )

# Barplot
ggplot(data, aes(x=社團種類, y=次數)) + 
  geom_bar(stat = "identity") +
  coord_flip()