# Load ggplot2
library(ggplot2)
# Create data
data <- data.frame(
cat=c("娛樂","知識","體育","D","E") ,
fre=c(185,82,36,18,45)
)
# Barplot
ggplot(data, aes(x=cat, y=fre)) +
geom_bar(stat = "identity",fill="purple")
# Create Data
Prop <- c(3,7,9,1,2)
# Make the default Pie Plot
pie(Prop)