スイマープロット

スイマープロットテンプレート。個々の患者の治療経過を横棒でプロット。

スイマープロット治療経過腫瘍
スイマープロット

R Code (ggplot2)

library(ggplot2)

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

ggplot(df, aes(x = x, y = y)) +
  geom_point(size = 2) +
  geom_line() +
  scale_x_continuous(name = "Time (months)", limits = c(0, 36)) +
  scale_y_continuous(name = "Patient", limits = c(0, 20)) +
  labs(title = "Swimmer Plot") +
  theme_bw(base_size = 14) +
  theme(plot.title = element_text(face = "bold", hjust = 0.5))