Skip to content

Support for ggmatrix #100

Closed
Closed
@tvatter

Description

@tvatter

Hi,

Currently, GGally provides the useful function ggpairs, which has no equivalent directly in ggplot. Its output is a ggmatrix, similar to the output of GGally's functin ggmatrix.

Would it be possible to have some kind of support this kind of object?

Otherwise, any suggestions to integrate something that behaves similarly to base R's pairs function?

Activity

thomasp85

thomasp85 commented on Jul 1, 2019

@thomasp85
Owner

If GGally provides a way to turn this object into a grob (equivalent to ggplot2::ggplotGrob()) then you could simply call that prior to using patchwork.

I'm reluctant to add support for strange objects beyond what ggplot2 offers, as the maintenance burden would be too high, and adding support for constructing a pairs plot is also outside of the scope of patchwork. It should be pretty easy to build on top of it, though...

stemangiola

stemangiola commented on Sep 13, 2021

@stemangiola

This is now a solution.

wrap_elements(ggmatrix_gtable(ggpairs_plot_1)) + wrap_elements(ggmatrix_gtable(ggpairs_plot_2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @thomasp85@tvatter@stemangiola

        Issue actions

          Support for ggmatrix · Issue #100 · thomasp85/patchwork