【R】ggthemr
2021年3月25日
					1. はじめに
ggthemrは、ggplotのcolor themeです。
2. インストール
Githubからインストールできます。
devtools::install_github('cttobin/ggthemr')
3. つかってみる
これらのthemeが含まれているそうです。
- flat
 - flat-dark
 - camoflauge
 - chalk
 - copper
 - dust
 - earth
 - fresh
 - grape
 - grass
 - greyscale
 - light
 - lilac
 - pale
 - sea
 - sky
 - solarized
 
ggthemrでthemeを指定して、グラフを描画します。
library(ggthemr)
library(ggplot2)
ggthemr("dust") 
ggplot(iris)+
  geom_point(aes(Petal.Length, Sepal.Length))

ggthemr("light") 
ggplot(iris)+
  geom_point(aes(Petal.Length, Sepal.Length))

Darkなもの。
ggthemr('flat dark')
p <- ggplot(mtcars, aes(disp, mpg, col= factor(gear))) +
  geom_point() + 
  facet_wrap(~am)
p

カモフラージュ
ggthemr('camouflage')
p

4. さいごに
これならthemeの設定が簡単なのでは?