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:
- df
pandas.DataFrame Data frame containing station names, coordinates, and noise levels. Expected columns: ‘Name’, ‘X’, ‘Y’, ‘Z’ (for side view), ‘NoiseLevel’.
- view
str, optional Specifies the view to plot. Options are ‘xy’ (X-Y), ‘xz’ (X-Z), or ‘yz’ (Y-Z). Default is ‘xy’.
- x_offset
float, optional Offset added to the min and max X coordinates for axis limits. If None, defaults to 10% of the X coordinate range.
- y_offset
float, optional Offset added to the min and max Y coordinates for axis limits. If None, defaults to 10% of the Y coordinate range.
- z_offset
float, 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_perc
float, optional, default: 0.1 Percentage of coordinate range to use as offset. Used only if offset value is None.
- plot_names
bool, optional, default: True Flag to plot station names or not (True or False)
- station_marker_size
int, 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.
- df
- Returns:
- fig
matplotlib.figure.Figure The figure object containing the plot.
- ax
matplotlib.axes.Axes The axes object of the plot.
- cax
matplotlib.axes.Axes The axes object for the colorbar.
- cbar
matplotlib.colorbar.Colorbar The colorbar object.
- fig