geom_line在線兩側有很大差距,如何消除這個差距!如何從ggplot2中的geom_line中刪除空白?
[R腳本被列爲遵循,
p <- ggplot(singJanS)+ geom_line(aes(x=sn,y=diff))
p <- p + geom_hline(yintercept=seq(-0.8,0.8,by=0.4), linetype=2, colour="grey") +
geom_vline(xintercept=seq(15,744,by=24), linetype=6, colour="red") +
geom_vline(xintercept=seq(23,744,by=24), linetype=6, colour="blue") +
ylab(Delta~T~' ('~degree~C~')')+xlab("")+
scale_x_continuous(breaks = c(0,120,240,360,480,600,720))+
scale_y_continuous(breaks = c(-0.8,-0.4,0,0.4,0.8)) +theme_bw()
你有沒有嘗試添加'XLIM(0,750)'你的圖形? –
謝謝!但它是無效的! –
你能提供'dput(singJanS)'的結果嗎?這樣我們就可以重現這個問題嗎? –