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


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


money <- c(5000,1000,600,8000,12000,25000,4350)


plot(weight,high,
     pch=17,
     col="#CA8EFF",
     xlab="體重",
     ylab="身高",
     main="班級的身高體重")

library(ggplot2)

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

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

fill="#FFD9EC"
library(ggplot2)

data <- data.frame(
  name=c("Apple","Banana","Cookie","Donut","Egg") ,  
  value=c(3,12,5,18,45)
  )

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

hist(weight,
     col= "#8F00FF",
     main ="班上的體重與身高",
     xlab ="體重",
     ylab ="次數")

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

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