![]() Years ago when writing the function this part requires a revision at GgOceanMaps (because ggplot2 graticules for those maps were bugged some To larger data size required by the package.ĭata ( ices_areas, package = "ggOceanMapsData" ) p <- basemap (limits = c ( - 20, 15, 50, 70 ), l = NA ) + # without graticules geom_sf (data = ices_areas, aes (fill = SubArea ), show.legend = FALSE ) # Make the graticules: lims <- attributes ( p ) $ limits graticule <- sf :: st_graticule ( c ( lims, lims, lims, lims ), crs = attributes ( p ) $ proj, lon = seq ( - 180, 180, 15 ), lat = seq ( - 90, 90, 5 ) ) # Plot reorder_layers ( p ) + geom_sf (data = graticule, color = "grey70", size = LS ( 0.5 ) ) + # graticules coord_sf (xlim = lims, ylim = lims, # redefine limits crs = attributes ( p ) $ proj ) + # labels on top of graticules geom_sf_label ( data = suppressWarnings ( sf :: st_centroid ( sf :: st_make_valid ( ices_areas ) ) ), aes (label = Area_Full ) )Īn exception are the polar maps for which graticules are drawn by This is to make the plotting quicker and more memory efficient but leads The basemap function uses pre-transformed shapefiles forĮach of the projections above (defined in shapefile_list). 30, max latitude ( limits) -60, and single integer latitudes -30.
0 Comments
Leave a Reply. |