uvisbox.Core.MapSetup.map_setup
Module Contents
- uvisbox.Core.MapSetup.map_setup.map_setup(data, *, projection=ccrs.PlateCarree(), extent_crs=ccrs.PlateCarree(), figsize=(10, 8), padding=5.0, use_nan_bounds=True, coastlines=True, coastline_resolution='10m', coastline_linewidth=0.5, borders=True, borders_linewidth=0.5, land=True, land_facecolor='lightgray', land_alpha=0.3, ocean=True, ocean_facecolor='lightblue', ocean_alpha=0.3, gridlines=True, draw_labels=True, gridline_linewidth=0.5, gridline_color='gray', gridline_alpha=0.5, label_size=10, show_top_labels=False, show_right_labels=False, figure_facecolor=None)[source]
Create a Cartopy map figure and axis from lon/lat data.
- Parameters:
data (array-like) – Array containing longitude and latitude in the last dimension. Supported shapes include (N, 2) and (…, 2). Longitude must be in data[…, 0], latitude in data[…, 1].
projection (cartopy.crs.Projection, optional) – Map projection used for the axes.
extent_crs (cartopy.crs.CRS, optional) – CRS used when setting the map extent. Usually PlateCarree for lon/lat data.
figsize (tuple, optional) – Figure size in inches.
padding (float, optional) – Padding added to all sides of the computed extent, in degrees.
use_nan_bounds (bool, optional) – If True, ignore NaN values when computing bounds.
coastlines (bool, optional) – Toggle map features on or off.
borders (bool, optional) – Toggle map features on or off.
land (bool, optional) – Toggle map features on or off.
ocean (bool, optional) – Toggle map features on or off.
coastline_resolution (str, optional) – Cartopy coastline resolution, e.g. “110m”, “50m”, “10m”.
coastline_linewidth (float, optional) – Line widths for coastline and border features.
borders_linewidth (float, optional) – Line widths for coastline and border features.
land_facecolor (str, optional) – Fill colors for land and ocean.
ocean_facecolor (str, optional) – Fill colors for land and ocean.
land_alpha (float, optional) – Transparency for land and ocean fills.
ocean_alpha (float, optional) – Transparency for land and ocean fills.
gridlines (bool, optional) – Add gridlines to the map.
draw_labels (bool, optional) – Show latitude/longitude labels on gridlines.
gridline_linewidth (optional) – Gridline styling.
gridline_color (optional) – Gridline styling.
gridline_alpha (optional) – Gridline styling.
label_size (int, optional) – Font size for gridline labels.
show_top_labels (bool, optional) – Control label placement for gridlines.
show_right_labels (bool, optional) – Control label placement for gridlines.
figure_facecolor (str or None, optional) – Background color for the figure.
- Returns:
fig (matplotlib.figure.Figure)
ax (cartopy.mpl.geoaxes.GeoAxesSubplot)