map_all (pyleoclim.utils.mapping.map_all)¶
- pyleoclim.utils.mapping.map_all(lat, lon, criteria, marker=None, color=None, projection='Robinson', proj_default=True, background=True, borders=False, rivers=False, lakes=False, figsize=None, ax=None, scatter_kwargs=None, legend=True, lgd_kwargs=None, savefig_settings=None, mute=False)[source]¶
Map the location of all lat/lon according to some criteria
Map the location of all lat/lon according to some criteria. Based on functions defined in the Cartopy package.
- Parameters
lat (list) – a list of latitudes.
lon (list) – a list of longitudes.
criteria (list) – a list of unique criteria for plotting purposes. For instance, a map by the types of archive present in the dataset or proxy observations. Should have the same length as lon/lat.
marker (list) – a list of possible markers for each criterion. If None, will use pyleoclim default
color (list) – a list of possible colors for each criterion. If None, will use pyleoclim default
projection (string) – the map projection. Available projections: ‘Robinson’ (default), ‘PlateCarree’, ‘AlbertsEqualArea’, ‘AzimuthalEquidistant’,’EquidistantConic’,’LambertConformal’, ‘LambertCylindrical’,’Mercator’,’Miller’,’Mollweide’,’Orthographic’, ‘Sinusoidal’,’Stereographic’,’TransverseMercator’,’UTM’, ‘InterruptedGoodeHomolosine’,’RotatedPole’,’OSGB’,’EuroPP’, ‘Geostationary’,’NearsidePerspective’,’EckertI’,’EckertII’, ‘EckertIII’,’EckertIV’,’EckertV’,’EckertVI’,’EqualEarth’,’Gnomonic’, ‘LambertAzimuthalEqualArea’,’NorthPolarStereo’,’OSNI’,’SouthPolarStereo’
proj_default (bool) –
If True, uses the standard projection attributes. Enter new attributes in a dictionary to change them. Lists of attributes can be found in the Cartopy documentation:
background (bool) – If True, uses a shaded relief background (only one available in Cartopy)
borders (bool) – Draws the countries border. Defaults is off (False).
rivers (bool) – Draws major rivers. Default is off (False).
lakes (bool) – Draws major lakes. Default is off (False).
figsize (list) – the size for the figure
ax (axis,optional) – Return as axis instead of figure (useful to integrate plot into a subplot)
scatter_kwargs (dict) – Dictionary of arguments available in matplotlib.pyplot.scatter (https://matplotlib.org/3.2.1/api/_as_gen/matplotlib.pyplot.scatter.html).
legend (bool) – Whether the draw a legend on the figure
lgd_kwargs (dict) – Dictionary of arguments for matplotlib.pyplot.legend (https://matplotlib.org/3.2.1/api/_as_gen/matplotlib.pyplot.legend.html)
savefig_settings (dict) –
Dictionary of arguments for matplotlib.pyplot.saveFig. - “path” must be specified; it can be any existed or non-existed path,
with or without a suffix; if the suffix is not given in “path”, it will follow “format”
”format” can be one of {“pdf”, “eps”, “png”, “ps”}
mute (bool) – if True, the plot will not show; recommend to set to true when more modifications are going to be made on ax
- Returns
ax
- Return type
The figure, or axis if ax specified
See also
pyleoclim.utils.mapping.set_proj
Set the projection for Cartopy-based maps