人口ピラミッド

人口ピラミッドテンプレート。年齢別・性別の人口構成を表示。

人口ピラミッド年齢分布人口動態性別
人口ピラミッド

R Code (ggplot2)

library(ggplot2)

# ---- Population Pyramid ----
# あなたのデータを入力してください
df <- data.frame(
  x = c(),
  y = c()
)

ggplot(df, aes(x = x, y = y)) +
  geom_point(size = 2) +
  geom_line() +
  scale_x_continuous(name = "Population (%)", limits = c(-10, 10)) +
  scale_y_continuous(name = "Age Group", limits = c(0, 18)) +
  labs(title = "Population Pyramid") +
  theme_bw(base_size = 14) +
  theme(plot.title = element_text(face = "bold", hjust = 0.5))