Skip to content

theme_void() does not remove grids #2079

Closed
@basille

Description

@basille

When using a custom grid, theme_void does not remove it. Here is a simple example illustrating it:

library(ggplot2)
qplot(1:10, (1:10)^2)                   # Basic plot
theme_update(panel.grid.major = element_line(colour = "red",
    size = 0.5))                        # I want major grid in red
qplot(1:10, (1:10)^2)                   # Works OK
qplot(1:10, (1:10)^2) + theme_void()    # Grid still here

Given that theme_void is supposed to be a completely empty theme, I think theme_void should redefine all elements to element_blank(), including panel.grid.major and panel.grid.minor, and probably others (I believe it is somehow related to #2058, in the sense that theme_void should redefine more elements than it currently does).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorthemes 💃

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions