LoginSignup
0
0

More than 5 years have passed since last update.

Joyplot ggplot2風に楽に行う

Posted at

複数のデータを可視化する際にJoyplotを用いますが、ggplot2風に楽にJoyplotを行うpackage "ggjoy"が出ていたのでみんな大好きなirisでサンプルコード

library(ggjoy)

# ggplot風なところがちらほら
ggplot(iris, aes(x = Sepal.Length, y = Species, fill = Species)) +
  geom_joy(show.legend = F) +
  geom_vline(xintercept = 10, col = "#ffc1c1") +
  theme(axis.text.y = element_text(size = 7.5),
        axis.text = element_text(colour = "#ffffe0"),
        panel.grid = element_blank(), 
        panel.background = element_rect(fill = "#0a0a0a"),
        plot.background = element_rect(fill = "#0a0a0a"),
        plot.margin = unit(rep(0.2, 4), "cm"))

綺麗なグラフが出ますね。
キャプチャ.PNG

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0