Created
May 13, 2026 08:39
-
-
Save pormr/a23be31799745128d844f3d7b20b7a2c to your computer and use it in GitHub Desktop.
Create aligned version of ggplot objects in place (requires {{patchwork}})
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| align_plots <- function(...) { | |
| x <- patchwork::align_patches(lapply(rlang::ensyms(..., .named = TRUE), get)) | |
| rlang::env_bind(parent.frame(), !!!x) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment