windkit.plot.spatial_structure_3d#
- windkit.plot.spatial_structure_3d(ds, ax=None, subsample: int = 1, marker_size: float = 20, color: str = 'steelblue', alpha: float = 0.8, show_tower_lines: bool = True)[source]#
3D perspective plot of a WindKit spatial structure.
Shows where data points sit in (west_east, south_north, height) space. Vertical tower lines are drawn for
stacked_pointandcuboidstructures to highlight multi-height sampling.- Parameters:
ds (xarray.Dataset or xarray.DataArray) – WindKit spatial object. Recognised structures:
point,stacked_point,raster,cuboid.ax (mpl_toolkits.mplot3d.Axes3D, optional) – 3D axes to draw on. A new figure is created when
None.subsample (int, optional) – Plot every n-th point along horizontal axes. Tower lines are subsampled by the same factor.
marker_size (float, optional) – Marker area in points squared passed to
scatter.color (str, optional) – Marker and line colour.
alpha (float, optional) – Transparency for markers (0–1). Tower lines are drawn at a reduced opacity to stay in the background.
show_tower_lines (bool, optional) – Draw vertical lines connecting height levels for structures that have multiple heights (
stacked_point,cuboid). Default True.
- Returns:
The axes object that was drawn on.
- Return type:
mpl_toolkits.mplot3d.Axes3D
- Raises:
ValueError – If the spatial structure cannot be determined.
NotImplementedError – If an unrecognised spatial structure is encountered.