Skip to content

ggsave should use plot theme for default background #4057

Closed
@hadley

Description

@hadley

I think @djnavarro tweeted about this recently, and I hit it too. It seems like in a situation like this:

plot %>%
  ...
  theme(
   plot.background = element_rect(fill = NA, colour = NA)
  )

ggsave("ratios.png", width = 8, height = 4.5, bg = NA)

ggsave() could automatically figure out what bg should be and pass it along to the graphics device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions