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.
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 incheck.length()
: ! 'gpar' element 'lwd' must not be length 0The same error comes up using the example in the geom_cartogram documentation.