library(ggplot2)

data <- data.frame(社團類型 = c("娛樂休閒", "知識閱讀", "體育競技", "科學創新", "公益活動"),
  次數 = c(185, 82, 36, 28, 25))

ggplot(data, aes(x = 社團類型, y = 次數)) + geom_segment(aes(x = 社團類型, xend = 社團類型, y = 0, yend = 次數),color = "skyblue", size = 1.2) + geom_point(color = "steelblue", size = 5) + labs(title = "社團類型次數棒棒糖圖", x = "社團類型", y = "次數") + theme_minimal() +theme(text = element_text(size = 15))
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.