hugo-apero icon indicating copy to clipboard operation
hugo-apero copied to clipboard

How can I get rid of the white margins when I use coord_equal()?

Open uriahf opened this issue 2 years ago • 1 comments

Hi everyone

I'm trying to display ggplot2 on my Hugo Apero blog and I get some white margins when I'm using coord_equal(). Any idea how to get rid of them?

Link:

https://rtichoke-blog.netlify.app/blog/2022-03-27-rtichoke-quick-start/

Snippet:

screenshot-rtichoke-blog netlify app-2022 05 23-12_01_27

uriahf avatar May 23 '22 09:05 uriahf

In your code, you're specifying background colour. Removing that part should fix it.

  geom_abline(intercept = 0, slope = 1, col = "grey", lty = 2) +   theme(
     panel.border = element_blank(),
      panel.grid.major = element_blank(),
      panel.grid.minor = element_blank() #,
    #plot.background = element_rect(fill = "#fff7f5")) -- no background necessary

harshvardhaniimi avatar Aug 09 '22 17:08 harshvardhaniimi