diagnostic.visualizations.plot_points_on_map#
- plot_points_on_map(d_point_coords: dict, ax=None, region=None)[source]#
Plot geographic points on a map using Cartopy, with optional region highlighting.
- Parameters:
d_point_coords (dict) – A dictionary where keys are point identifiers (e.g., station names or IDs) and values are tuples of longitude and latitude coordinates (e.g., {‘Point1’: (lon1, lat1), ‘Point2’: (lon2, lat2)}).
ax (matplotlib.axes.Axes, optional) – The axes on which to plot the points. If None, a new figure and axes with a PlateCarree projection are created.
region (str or None, optional) – The region to highlight on the map. This could be a predefined region name (e.g., ‘belgium’) or None if no specific region is needed.
- Returns:
The axes with the plotted points and the map features.
- Return type:
matplotlib.axes.Axes
Example
>>> d_point_coords = {'Point1': (4.3517, 50.8503), 'Point2': (5.5413, 50.6326)} >>> plot_points_on_map(d_point_coords, region="belgium")