windkit.plot.raster_plot

windkit.plot.raster_plot(da, contour=None, contour_color='white', pts=None, points_color='red', colormap=None, color_scale_limits=None, plot_title=None, **kwargs)[source]

Creates a raster map plot.

Parameters:
  • da (xarray.DataArray) – WindKit 2d data array in south_north,west_east.

  • contour (xarray.DataArray or geopandas.GeoDataFrame) – WindKit 2d array in south_north,west_east or geopandas.GeoDataFrame of lines.

  • contour_color (str, optional) – String defining the color of the countor lines, default at “white”. Strings should define valid CSS-colors.

  • pts (xarray.DataArray) – WindKit point data array of points to “highlight” on map

  • points_color (str, optional) – String defining the color of points, default at “red”. Strings should define valid CSS-colors.

  • colormap (str, optional) –

    Matplotlib colormap name. If not provided, this will be:

    • a predefined colormap, if defined for the variable, currently defined for: z0meso, site_elev, and speedup and turning variables

    • The default colors for xarray.plot.colormesh: ‘viridis’ (sequential dataset) or ‘RdBu_r’ (diverging dataset)

  • color_scale_limits (array of two floats, optional) – Defines the color scale limits. If not provided the limits will be the minimum and the maximum value of ‘da’.

  • plot_title (str, optional) – Defines the title of the map. If not provided the map won’t have title.

  • kwargs (dict, optional) – Extra keyword arguments to Matplotlib plotting functions (pcolormesh and contour).

Returns:

Matplotlib figure for display, additional modification, or output.

Return type:

matplotlib.figure.Figure