coord_fixed() creates white area

43 views
Skip to first unread message

Martin Møller Skarbiniks Pedersen

unread,
Dec 19, 2020, 10:19:51 AM12/19/20
to ggplot2
Hi,


If I don't use the coord_fixed() then all the background is yellow as expected.
But I need to coord_fixed() and then it adds a little white around my plot.
Is it possible to avoid the white and use coord_fixed() ?

Here is a "Minimal, Reproducible Example":

library(ggplot2)
g <-
  ggplot() +
  theme(
     plot.background = element_rect(fill = "yellow2"),
     panel.background = element_rect(fill = "yellow2"),
  )
g <- g + coord_fixed()
g

Regards
Martin M. S. Pedersen

Reply all
Reply to author
Forward
0 new messages