title: Remove white background from ggplot2 map
body: <p>I created the map below for a project, and I chose to the background of the map to be black, however, there is always this white background in the left and right of the image. This is the code I used to generate it:</p>
  <pre><code>ggplot(merged) +
  geom_sf(aes(fill = value/10000000000), color = NA, alpha = 0.9) +
  geom_sf(data = borders, fill = NA, size = 0.1, col = &quot;grey30&quot;) +
  coord_sf(
    xlim = c(2377294, 6500000),
    ylim = c(1413597, 5228510)
  ) + scale_fill_gradient2(
    name = &quot;Euros (Billions)&quot;,
    guide = guide_legend(
    direction = &quot;horizontal&quot;,
    keyheight = 0.5,
    keywidth = 2,
    title.position = &quot;top&quot;,
    title.hjust = 0,
    label.hjust = .5,
    nrow = 1,
    byrow = TRUE,
    reverse = FALSE,
    label.position = &quot;bottom&quot;
  )
  ) + theme_void()+
  labs(
  title = &quot;Trade Balance of EU-28 Countries (2020)&quot;,
  subtitle = &quot;(Billions of Euros)&quot;,
  caption = paste0(&quot;Source: Eurostat&quot;)) +
  # Theme
  theme(
  plot.background = element_rect(fill = &quot;black&quot;),
  plot.title = element_text(
    color = &quot;grey90&quot;,
    hjust = 0.5,
    vjust = -1,
  ),
  plot.subtitle = element_text(
    color = &quot;grey90&quot;,
    hjust = 0.5,
    vjust = -2,
    face = &quot;bold&quot;
  ),
  plot.caption = element_text(
    color = &quot;grey90&quot;,
    size = 6,
    hjust = 0.5,
    margin = margin(b = 2, t = 13)
  ),
  legend.text = element_text(
    size = 7,
    color = &quot;grey90&quot;
  ),
  legend.title = element_text(
    size = 7,
    color = &quot;grey90&quot;
  ),
  legend.position = c(0.5, 0.02),
  )
  </code></pre>
  <p><a href="https://i.stack.imgur.com/w3V4r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w3V4r.png" alt="enter image description here" /></a></p>
  <p>I would be grateful if someone can provide some help as to how to remove the white on the sides. Thanks.</p>