Skip to content

Commit

Permalink
fix ggplot deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Feb 8, 2024
1 parent 0261303 commit e096c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/vertmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ vertmap <- function(input = NULL, mapdatabase = "world", region = ".",
if (name) {
# Color record locations by scientificname
ggplot(basemap, aes(long, lat)) + # Plot using lat/long of base map
geom_polygon(aes(group = group), fill = "white", color = "gray40", size = 0.2) +
geom_polygon(aes(group = group), fill = "white", color = "gray40", linewidth = 0.2) +
geom(data = tomap, aes(decimallongitude, decimallatitude, colour = scientificname),
alpha = 0.4, size = 3, position = jitter) +
labs(x = "Longitude (decimal degrees)", y = "Latitude") +
theme_bw(base_size = 14)
} else {
# Do not distinguish record locations by color
ggplot(basemap, aes(long, lat)) +
geom_polygon(aes(group = group), fill = "white", color = "gray40", size = 0.2) +
geom_polygon(aes(group = group), fill = "white", color = "gray40", linewidth = 0.2) +
geom(data = tomap, aes(decimallongitude, decimallatitude),
alpha = 0.4, size = 3, position = jitter) +
labs(x = "Longitude (decimal degrees)", y = "Latitude") +
Expand Down

0 comments on commit e096c28

Please sign in to comment.