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

high <- c(160,170,175,150,153,165)
mean(weight)    #平均數
## [1] 55.5
plot(weight,high,
     pch=18,
     col="red",
     xlab="體重",
     ylab="身高",
     main="身高體重")

# Load ggplot2
library(ggplot2)

# Create data
data <- data.frame(
 name=c("謝憐","花城","魏無羨","藍忘機","洛冰河","沈清秋") ,  
  value=c(50,45,28,38,8,18)
  )

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

hist(weight,
     col= "red",
     main ="體能與次數",
     xlab ="體能",
     ylab ="次數")

data2<- c(50,35,28,48)
labels <- c("天官賜福","魔道祖師","人渣反派自救系統","三寶皆有")

pie(data2,labels,main ="入坑的比例", col=heat.colors(length(data2)))