2016-08-01 28 views
0

x軸とxティックの間のスペースを削除したいと思います。赤い矩形の領域になります。 例x軸とxティックの間の領域を削除

ggplot(mtcars, aes(factor(cyl))) + geom_bar() 

xラベルの間隔には情報がありますが、xラベルとx軸の距離には関係しません。

enter image description here

答えて

0

ちょうどあなたのggplotscale_y_continuous(expand = c(0,0))を追加します。

ggplot(mtcars, aes(factor(cyl))) + geom_bar() + 
    scale_y_continuous(expand = c(0, 0)) 

Boxplot with removed area between x-axis and plot-area

関連する問題