Skip to content

sf graticules are drawn even if relevant theme elements are set to element_blank() #2525

Closed
@karldw

Description

@karldw

theme_void() is a great way to clear out all the extra lines in a chart. My intuition was that this theme would remove to graticules from geom_sf() as well, but it doesn't. Do you think it should?

library(sf) 
library(ggplot2)

nc <- st_read(system.file("gpkg/nc.gpkg", package = "sf")) 

ggplot(nc) + 
  geom_sf(data = nc, aes(fill = AREA)) + 
  theme_void()

# The actual way to remove graticules:
ggplot(nc) + 
  geom_sf(data = nc, aes(fill = AREA)) + 
  coord_sf(datum = NA) + 
  theme_void()

Here's a theme_void map of North Carolina:
North Carolina with graticule

And here's what I expected, with no graticule:
North Carolina no graticule

Ref: #2071

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