Long story short, I have a few svg images which I want to lay out using ggarrange (and ideally get into a ggplot to use ggtitle() and so on).
I can import the images with rsvg and grImport, but the layout get's somehow messed up:
rsvg::rsvg_svg("https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/compuserver_msn_Ford_Focus.svg", "cairo.svg")
raw <- grImport2::readPicture("cairo.svg")
grob <- grImport2::pictureGrob(raw, x=unit(0, "cm"), y = unit(0, "cm"), just = "left", expansion = 0.05)
ggpubr::ggarrange(grob,grob,grob,grob,grob,grob, labels=c("A", "B", "C", "D","E","F"), ncol=2, nrow=3)
ggsave("cairo.pdf", width=8, height=16)
I have played around with the different pictureGrob options, but the issue that the "bounding box" ggarrange puts around the svg image is way too large persists.
