-
-
Notifications
You must be signed in to change notification settings - Fork 20
Unable to add usmap$layer to ggplot object #43
Copy link
Copy link
Closed
Labels
bugA bug or issue that should be resolvedA bug or issue that should be resolved
Milestone
Description
Describe the bug
As I understand it, currently the only way to have county data and state data in the same map is to create the maps separately, extract their layers and add it to a single ggplot object.
However, this method throws an error.
Simplest code to reproduce
ggplot() +
plot_usmap()$layers[[1]]
Error
Error in FUN(X[[i]], ...) : object 'x' not found
Environment:
- Windows 10 x64
- R v4.0.3
- ggplot2_3.3.2
- usmap_0.5.1
Additional info
This method is also the only way to add multiple levels of data on the same map. So this should be looked into regardless of #26
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA bug or issue that should be resolvedA bug or issue that should be resolved