9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

レポート用オレオレggplot2設定

Last updated at Posted at 2015-03-14

レポートとかに掲載する場合、デフォルトの凡例では文字が小さすぎるんで。

qplot(displ, hwy, data=mpg, colour=factor(cyl),
      geom="line") + ## opts(drop = "legend_box")
  theme(legend.box = NULL)

def0.png

oldTheme <- theme_update(
    axis.title.x = element_text(size = 18, vjust = 0.5), # x軸ラベルサイズ
    axis.title.y = element_text(size =18, vjust = 0.5, angle = 90),# y軸ラベル
    legend.text =  element_text(size = 18), # 凡例
    legend.key.size = grid::unit(3.0, "lines"),
    legend.title = element_text(face = "bold", size = 18, hjust = 0),
    axis.text.x = element_text(colour = "grey50", size = 18, vjust = 1,     lineheight = 0.9),#x軸目盛ラベル
    axis.text.y = element_text(colour = "grey50", size = 18, hjust = 1,  lineheight = 0.9),#y軸目盛ラベル
    strip.text.x = element_text(size = 18), #ストリップ内の凡例サイズ
    strip.text.y = element_text(size = 18, angle = -90),
    plot.title = element_text(size = 22)
    )

def.png

設定後

9
8
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
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?