One guy just told me about using the function ggdraw
to overlap two figure.
When I saved the output using ggsave
, the margin of both side (left, right) of my picture was shrank. I did use its arguments, but nothing happened.
Does anyone know about setting up the margin when using this function ggdraw
?
updated
I would like to add the output that I got by using this code (it is a clip since I want you to see it clearly)
p1 <- cowplot::ggdraw(p) + cowplot::draw_plot(legend, x = .18, y = .25, width = 0.5, height = .5)
ggsave(plot = p1, filename = "outputs/tree_test.png",
width = 45, height = 30, units = "cm", dpi = 300)
You guys can see that my margin of both sides has gone!.