ggplot

ggplotでグラフの形(shape)を変える。

ggplotでグラフの形を変える。 scale_shape_manualを用いる ggplot(smp, aes(x = year, y = value, group = country)) + geom_line(aes(color = country)) + geom_point(aes(color = country, shape = country)) + scale_shape_manual(values = 0:length(uni…

ggplot2で両対数グラフ その3. いくつかの系列をプロット

ggplot2で両対数グラフ その3. いくつかの系列をプロット d<-data.frame(rr_rd_mean_0[[1]],rr_rd_sd[[1]],rr_rd_mean_0[[42]],rr_rd_sd[[42]],rr_rd_mean_0[[79]],rr_rd_sd[[79]]) colnames(d)<-c("x1","y1","x2","y2","x3","y3") g<-ggplot(data=d)+them…

ggplot 対数グラフに補助線をつける例

ggplot 対数グラフに補助線をつける例 サイズ指定をIでやるのはポイント。。 p<-qplot(vf+vf/2,iqr1,log="xy",geom="point",shape=I(17))+theme_bw(base_size=32)+scale_x_log10(labels=trans_format("log10",math_format(10^.x)))+scale_y_log10(labels=tra…

Rのggplotで両対数プロット 軸の目盛文字の大きさ 、10のべき乗の軸数字表示などのまとめ

以下の方法が楽かも q<-qplot((vs+vf)/2,sd2009_2010)+scale_x_log10(labels=trans_format("log10",math_format(10^.x)))+scale_y_log10(labels=trans_format("log10",math_format(10^.x)))+theme_bw(base_size=27) q<-q+xlab("Counts 2009")+ylab("S.D of r…