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=trans_format("log10",math_format(10^.x))) x<-exp(seq(log(600),log(10^7),length.out=300)) p<-p+geom_line(aes(x,0.16*(x/400)^-0.3),colour=I(2),linetype=I(2),size=2) p<-p+xlab("Count 2009")+ylab("IQR of r; 2010-2009") print(p)