# NOT RUN {
img <- magick::image_read("https://jeroen.github.io/images/Rlogo.png")
grid.newpage()
tg1 <- texture_grob(
img,
x = unit(.2, "npc"), y = unit(.05, "npc"),
width = unit(.1, "npc"), height = unit(.9, "npc"),
img_width = unit(.5, "in"), ncol = 1
)
tg2 <- texture_grob(
img,
x = unit(.5, "npc"), y = unit(.05, "npc"),
width = unit(.3, "npc"), height = unit(.6, "npc"),
img_width = unit(.5, "in"), ncol = 1
)
grid.draw(tg1)
grid.draw(tg2)
# }
Run the code above in your browser using DataLab