0

I'm trying to combine several figures drawn in PowerPoint into a panel, using patchwork, cowplot, magick. However, I always feel that the distance between the annotation and the actual figure is too big, and I'm struggling to find a way that minimises the distance.

enter image description here

Is there a way to fix this issue?

Here's is my code.

library(patchwork)
library(cowplot)
library(magick)

# You can test with any other image, so the code should be reproduceable
design <- "./design.png"
courses <- "./courses.png"

# here I draw the figure using draw_image
design <- ggdraw() + draw_image(design,   x = 0,
                                y = 0)

courses <- ggdraw() + draw_image(courses)

design / courses + plot_annotation(tag_levels = 'A')

Nico
  • 463
  • 5
  • 11
Cmagelssen
  • 620
  • 5
  • 21

1 Answers1

0

A solution that fixed the problem was to use ggsave and playing around with the width and height, as suggested in the comments. For me, this one worked.

plot <- design / courses + plot_annotation(tag_levels = 'A')
ggsave("myplot.tiff", device = "tiff", height = "0.5")

Cmagelssen
  • 620
  • 5
  • 21