MikkoVihtakari / ggOceanMaps

Plot oceanographic research data on maps using ggplot2
GNU General Public License v3.0
45 stars 7 forks source link

Land disappearing below 40 degrees latitude #16

Closed marianagarciacriado closed 1 year ago

marianagarciacriado commented 1 year ago

Hi Mikko, I'm getting a land cut when I project an Arctic land map with ggOceanMaps where my southernmost values are at 32 degrees latitude. I've tried a couple of ways but I get the same result with slightly different formats (see below). Is there any way to fix this please? I've updated both ggOceanMaps and ggOceanMaps packages from the GitHub version. Thank you!

1) Specifying the shapefile basemap: (tundra.map1 <- basemap(data = dt, land.col = "#c9c7c1", shapefiles = list(land = ggOceanMapsData::arctic_land, glacier = NULL, bathy = NULL)) + geom_point(data = dt, aes(x = lon.proj, y = lat.proj, colour = TraitShort), alpha = 0.4, size = 12) + labs(title = "(a)") + scale_colour_manual(values = c("#800080", "#E57E00","#0a6933"), guide = guide_legend(title = "Plant Traits", override.aes = list(alpha = 1)), labels = c("Height", "Seed Mass", "SLA")) + theme(legend.title = element_text(size = 24, face = "bold"), legend.text=element_text(size = 22), plot.title = element_text(face = "bold", size = 26))) 2022_v1_polar_traits_map_new

2) Specifying the latitudinal limit with an integer: (tundra.map2 <- basemap(data = dt, limits = 32, land.col = "#c9c7c1") + geom_point(data = dt, aes(x = lon.proj, y = lat.proj, colour = TraitShort), alpha = 0.4, size = 12) + labs(title = "(a)") + scale_colour_manual(values = c("#800080", "#E57E00","#0a6933"), guide = guide_legend(title = "Plant Traits", override.aes = list(alpha = 1)), labels = c("Height", "Seed Mass", "SLA")) + theme(legend.title = element_text(size = 24, face = "bold"), legend.text=element_text(size = 22), plot.title = element_text(face = "bold", size = 26))) ![Uploading 2022_v2_polar_traits_map_new.png…]()

MikkoVihtakari commented 1 year ago

Seems like you have not updated ggOceanMapsData. This issue was fixed here: https://github.com/MikkoVihtakari/ggOceanMapsData/commit/d527a67cc5bb690e34ad712b142e766b93b2929c

Try updating the packages from GitHub:

devtools::install_github("MikkoVihtakari/ggOceanMapsData") # required by ggOceanMaps
devtools::install_github("MikkoVihtakari/ggOceanMaps")

Please let me know if that fixes the issue :)

MikkoVihtakari commented 1 year ago

Closing this. Open if needed.