hrbrmstr / ggalt

:earth_americas: Extra Coordinate Systems, Geoms, Statistical Transformations & Scales for 'ggplot2'
https://cran.r-project.org/web/packages/ggalt/vignettes/ggalt_examples.html
Other
654 stars 99 forks source link

Error in new version of geom_cartogram() #85

Open AlSo4352 opened 1 year ago

AlSo4352 commented 1 year ago

This code was working properly in previos versions ggplot() + geom_cartogram(data = mymap, aes(x = long, y = lat, map_id = id), map = mymap) + geom_cartogram(data = mypoly.df, aes(fill = value, map_id = group), map = mymap) + geom_text_repel(data = centers, aes(label = zip, x = x, y = y), size = 3) + scale_fill_gradientn(colours = rev(brewer.pal(10, "Spectral"))) + coord_map() + theme_map()

it is now giving an error Error in geom_cartogram(): ! Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in check.length(): ! 'gpar' element 'lwd' must not be length 0

The same error comes up using the example in the geom_cartogram documentation.