pynetdesign.visualization.geometry.plot_stations_view#

pynetdesign.visualization.geometry.plot_stations_view(df, view='xy', x_offset=None, y_offset=None, z_offset=None, offset_perc=0.1, plot_names=True, station_marker_size=100, grid_points=None, grid_marker_size=1, use_warnings=True)[source]#

Plots either a map view or side view of stations as filled triangles with name labels. Optionally plots grid points as well. Color-codes the triangles based on noise level and adds a colorbar.

Parameters:
dfpandas.DataFrame

Data frame containing station names, coordinates, and noise levels. Expected columns: ‘Name’, ‘X’, ‘Y’, ‘Z’ (for side view), ‘NoiseLevel’.

viewstr, optional

Specifies the view to plot. Options are ‘xy’ (X-Y), ‘xz’ (X-Z), or ‘yz’ (Y-Z). Default is ‘xy’.

x_offsetfloat, optional

Offset added to the min and max X coordinates for axis limits. If None, defaults to 10% of the X coordinate range.

y_offsetfloat, optional

Offset added to the min and max Y coordinates for axis limits. If None, defaults to 10% of the Y coordinate range.

z_offsetfloat, optional

Offset added to the min and max Z coordinates for axis limits (side view only). If None, defaults to 10% of the Z coordinate range.

offset_percfloat, optional, default: 0.1

Percentage of coordinate range to use as offset. Used only if offset value is None.

plot_namesbool, optional, default: True

Flag to plot station names or not (True or False)

station_marker_sizeint, optional, default: 100

Size of the station markers in the scatter plot

grid_points: :obj:`np.ndarray`, optional, default: None

Array of shape (ngrid, 3) representing grid points’ coordinates (X, Y, Z).

grid_marker_size: :obj:`int`, optional, default: 10

Size of the grid points markers in the scatter plot

use_warnings: :obj:`bool`, optional, default: True

If True, enable warnings, if False, disable them.

Returns:
figmatplotlib.figure.Figure

The figure object containing the plot.

axmatplotlib.axes.Axes

The axes object of the plot.

caxmatplotlib.axes.Axes

The axes object for the colorbar.

cbarmatplotlib.colorbar.Colorbar

The colorbar object.