inst/examples/quake6-bubbles.R

# 地震的时间频数图
data(quake6, package = "MSG")
library(ggplot2)
p = ggplot(quake6, aes(x = year, y = month)) +
  stat_sum(aes(size = ..n..)) +
  labs(x = "年份", y = "月份", size = "频数") +
  scale_y_continuous(breaks = 1:12, minor_breaks = NULL) +
  scale_size(range = c(1, 8))
print(p)

Try the MSG package in your browser

Any scripts or data that you put into this service are public.

MSG documentation built on July 22, 2021, 1:06 a.m.