ggplot2のqplotで簡単にきれなグラフ

事前にlibrary(ggplot2)はしておく

x<-1:10
y<-2*x
qplot(x,y,geom="line",xlab="date",ylab="count")+theme_bw(base_size=30)


plot(x,y,type="b")は,geom=c("line","point")

qplot(cc[4:length(cc)],exp(m1),xlab="Mean of start",ylab="Mean of 6 year ratio",log="x",geom=c("line","point"))+theme_bw(base_size=30)

対数プロットに補助線

v<-qplot(sort(r0b),length(r0b):1/length(r0b),log="xy",type="l",xlab="Counts",ylab="CDF")+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=25)
v<-v+geom_line(aes(x=(1:100),y=(0.2*(1:100)^-1)),colour=2,size=2,linetype=2)
print(v)