How to remove the margin between plot region and panel in ggplot2?

前端 未结 1 1636
温柔的废话
温柔的废话 2021-01-04 00:09

I am creating some maps and want to remove all margins between the plot region and panel border.

This is the minimal example to reproduce my question



        
1条回答
  •  一整个雨季
    2021-01-04 00:46

    (Alright, here's my comment as an answer..)

    Just add the following to the plot:

    + scale_y_continuous(expand = c(0,0)) + scale_x_continuous(expand = c(0,0))
    

    0 讨论(0)
提交回复
热议问题