Skip to content

Theme interface for ggpairs subplots #569

@marcuslehr

Description

@marcuslehr

Hi, I'm enjoying the ggpairs() function, however one bothersome point is that if I want to change the theme for one set of subplots (vs all subplots) I have recreate the whole plot and append the theme. To change the whole plot, you can of course simply do ggpairs() + theme_bw() or whatever. But for example, with the correlation plots this doesn't make sense as it adds grid lines. To get around this, I've been doing things like:

diag = list(continuous = \(data,mapping,...) ggplot(data,mapping)+geom_density(...)+theme_classic() )

But of course it's a bit of a bother trying to recreate all the subplots, especially the more complex ones. I would have to guess that adjusting the theme is the most common modification people want to make to the subplots, so a simplified interface would be very convenient. So as a suggestion/feature request, could you add a theme interface for the upper/lower/diag plots? Perhaps within the upper/lower/diag lists you could accept a 'theme' argument that updates the plot theme? Then the above syntax could be simplified to:

diag = list(theme = 'classic')

That would be really nice. Thanks!

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