data<- c(50,23,35,48)
labels <- c("義大利麵","越式三明治","飯糰","滷肉飯")

pie(data,labels,main ="喜歡的食物 - 餅狀圖", col=heat.colors(length(data)))

legend("topright", labels, cex = 0.9, fill = heat.colors(length(labels)))

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 ="身高")

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

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

plot(weight, high)

# library
library(ggplot2)


data3 <- data.frame(weight, high)
 
# use options!
ggplot(data3, aes(x=weight, y=high)) + 
    geom_point(
        color="black",
        fill="#69b3a2",
        shape=22,
        alpha=0.5,
        size=6,
        stroke = 1
        ) 

  stem(weight)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   4 | 3
##   4 | 
##   5 | 02
##   5 | 55
##   6 | 3
##   6 | 7