Closed
Description
Hi Thomas,
Not sure if this is a bug or just a feature not yet implemented (or I'm just doing something wrong), but it seems like images cannot be treated just like ggplot objects for composing patchworks. For the two examples that fail below, they work if logo is replaced with p1
, a ggplot object.
library(magrittr)
library(ggplot2)
library(patchwork)
p1 <-
mtcars %>%
ggplot(aes(mpg, hp)) +
geom_point() +
theme_light()
logo <- system.file('help', 'figures', 'logo.png', package = 'patchwork')
logo <- png::readPNG(logo, native = TRUE)
(p1 / p1) / logo
(p1 / p1) | logo
#> Error: Only knows how to fold ggplot objects together
(p1 | p1) / logo
#> Error: Only knows how to fold ggplot objects together
Metadata
Metadata
Assignees
Labels
No labels