I tried this code but i can not crop the graph
df <- tibble(x = 1, percent = 54.2) %>%
mutate(title = paste0(percent, "%"))
ggplot(df, aes(xmin = 1, xmax = 1.5, ymin = 0, ymax = percent)) +
geom_rect(aes(xmin = 1, xmax = 1.5, ymin = 0, ymax = 100), fill = "#ece8bd") +
geom_rect(fill = "#47d22d") +
xlim(c(0, 1.5)) +
ylim(c(0, 200)) +
coord_polar(theta = "y", start = -pi/2) +
theme_void()+
theme(plot.margin = unit(c(-2, 0, -2, -.1), "cm")) +
geom_text(label = 0, x = 1.6, y = 2, colour = "black", size = 6, family = "Roboto") +
geom_text(label = 100, x = 1.7, y = 98, colour = "black", size = 6, family = "Roboto") +
geom_text(aes(label = title), x = 0.4, y = 50, colour = "black", size = 10, family = "Roboto")
ggsave("mtcars.png", width = 4, height = 4, bg = "transparent")