Edited at

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

More than 3 years have passed since last update.

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

qplot(displ, hwy, data=mpg, colour=factor(cyl),

geom="line") + ## opts(drop = "legend_box")
theme(legend.box = NULL)

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)
)

設定後