0

This code

qplot(1:100, 1:100) + 
  theme_void() +
  theme(plot.background=element_rect(fill="green"))

produces a plot (shown below) that still has some space outside of the plotting area. I would like this space to be removed. The centers of the (1,1) and (100,100) points in the plot below should be exactly at the lower-left and upper-right corners, respectively.

Is there a way to achieve this?

(The reason I need this is that I am using this as lower layer for annotation_custom(). I am using the 1:100 x/y grid to overlay other plots, however this whitespace gives problems when positioning other elements, since the relative proportions are changed after resizing.)

too much space around points

mkln
  • 14,213
  • 4
  • 18
  • 22

0 Answers0