相関行列ヒートマップ

相関行列ヒートマップテンプレート。変数間の相関係数を色で可視化。

相関行列ヒートマップ統計
相関行列ヒートマップ

R Code (ggplot2)

library(ggplot2)

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

ggplot(df, aes(x = x, y = y)) +
  geom_point(size = 2) +
  geom_line() +
  scale_x_continuous(name = "Variables", limits = c(0, 6)) +
  scale_y_continuous(name = "Variables", limits = c(0, 6)) +
  labs(title = "Correlation Matrix") +
  theme_bw(base_size = 14) +
  theme(plot.title = element_text(face = "bold", hjust = 0.5))