治療法別HbA1c(箱ひげ図)

治療法別のHbA1c分布を比較する箱ひげ図テンプレート。

HbA1c治療箱ひげ比較
治療法別HbA1c(箱ひげ図)

R Code (ggplot2)

library(ggplot2)

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

ggplot(df, aes(x = x, y = y)) +
  geom_point(size = 2) +
  geom_line() +
  scale_x_continuous(name = "Treatment", limits = c(0, 5)) +
  scale_y_continuous(name = "HbA1c (%)", limits = c(4, 14)) +
  labs(title = "HbA1c by Treatment (Boxplot)") +
  theme_bw(base_size = 14) +
  theme(plot.title = element_text(face = "bold", hjust = 0.5))