GuangchuangYu / ggimage

:art: Use Images in ggplot2
https://cran.r-project.org/package=ggimage
172 stars 34 forks source link

error with geom_flag #35

Open fm555 opened 3 years ago

fm555 commented 3 years ago

I am trying to reproduce the geom_flag example in the link: https://mran.microsoft.com/snapshot/2018-05-23/web/packages/ggimage/vignettes/ggimage.html

But when I am running this code:

f <- system.file("extdata/medals.txt", package="ggimage") medals <- read.table(f, header=TRUE) p <- ggplot(medals, aes(Country, count)) + geom_col(aes(fill = medal), width = .8)

p + geom_flag(y = -2, aes(image = code)) + coord_flip() + expand_limits(y = -2) + scale_fill_manual(values = c("Gold" = "gold", "Bronze" = "#cd7f32", "Silver" = "#C0C0C0"))

I am getting the following error message:

Error in class(grobs) <- "gList" : attempt to set an attribute on NULL

Is there a quick way to solve this issue?

amazongodman commented 2 years ago

We believe this is due to the fact that the flag image in the source code has been removed. I'm sending out a request message.

https://github.com/GuangchuangYu/ggimage/pull/39

MonteD50 commented 2 years ago

Having the same issue now. Any resolution?

MartinSchweinberger commented 2 years ago

Also having the same issue :/