Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in new version of geom_cartogram() #85

Open
AlSo4352 opened this issue May 25, 2023 · 0 comments
Open

Error in new version of geom_cartogram() #85

AlSo4352 opened this issue May 25, 2023 · 0 comments

Comments

@AlSo4352
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant