R ggplot2 !!!theme() * グラフの調整 {{pre g <- ggplot(tmp) g <- g + aes(x=文長, y=value, color=name) g <- g + geom_point() g <- g + geom_smooth(method="lm") g <- g + labs(title="MHD vs. KJ", # タイトル x = "文長 (sentence length)", # x軸名 y = "Index Value", # y軸名 color="指標" # 凡例の見出し ) g <- g + theme(aspect.ratio=1, # 全体の縦横比 title=element_text(size=20), # タイトルの文字サイズ axis.title=element_text(size=18), # x軸名の文字サイズ axis.text=element_text(size=12), # y軸名の文字サイズ legend.text=element_text(size=12), # 凡例の文字サイズ #legend.position = "top", # 凡例の位置(図の上) legend.justification = "top" # 凡例の位置(上揃え) ) plot(g) }} {{ref_image MHDvKJ.png}}