statistic=c(68,85,74,88,63,78,90,80,58,63)
math=c(85,91,74,100,82,84,78,100,51,70)
plot(statistic,math,
     pch = 17,
     col= "#D18063",
     main ="班上的統計及數學成績",
     xlab ="數學成績",
     ylab ="統計成績")

library(ggplot2)
score<- data.frame(數學成績=math,統計成績=statistic)
ggplot(score, aes(x=數學成績, y=統計成績)) + 
    geom_point(
        color="#D18063",
        fill="#F9D9CA",
        shape=25,
        alpha=1,
        size=3,
        stroke =2)

hist(math,
     col= "#EEB8B8",
     main ="班上的數學成績",
     xlab ="數學成績",
     ylab ="人數")

data<-data.frame(
  社團類型<-c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動"),次數<-c(185,82,36,28,25))
ggplot(data, aes(x=社團類型, y=次數))+
  geom_bar(stat= "identity", width=0.3,fill="#EEB8B8", color="#D18063",alpah=0.2)
## Warning in geom_bar(stat = "identity", width = 0.3, fill = "#EEB8B8", color =
## "#D18063", : Ignoring unknown parameters: `alpah`

pink_palette<-colorRampPalette(c("#FAF0E4","#EECFBB","#F6B99D","#CB8A90"))
pink_palette(10)
##  [1] "#FAF0E4" "#F6E5D6" "#F2DAC8" "#EECFBB" "#F0C7B1" "#F3C0A7" "#F6B99D"
##  [8] "#E7A998" "#D99994" "#CB8A90"
pie(次數,社團類型,main ="社團人數的比例", col=pink_palette(length(次數)))

data <- data.frame(x=社團類型,y=次數)
ggplot(data, aes(x=社團類型, y=次數)) +
  geom_segment( aes(x=x, xend=x, y=0, yend=y)) +
  geom_point( size=5, color="#B57FB3", fill=alpha("#DEB3CF", 1), alpha=1, shape=15, stroke=2)

library(readr)
test<-read.csv("D:/midterm.csv")
stem(test$Japanese)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   4 | 9
##   5 | 139
##   6 | 13
##   7 | 9
##   8 | 49
##   9 | 1