Hello! I am trying to transpose an image onto a donut chart. The image (world.png) originally has a transparent background but is showing up with a white background. Does anyone know how to troubleshoot the issue?
setwd("~/Desktop")
library("patchwork")
library(png)
library(grid)
img <- readPNG('~/Desktop/world.png')
g <- rasterGrob(img, interpolate=TRUE)
p_image <- plotsun + # plotsun was created using ggplot
inset_element(p = g,
left = -0.005,
bottom = 0.3,
right = 0.9,
top = 0.7)
p_image