pynetdesign.visualization.sensitivity.plot_sensitivity_slice#
- pynetdesign.visualization.sensitivity.plot_sensitivity_slice(sens_data, xi=None, yi=None, zi=None, geometry_df=None, plot_title=None, clb_title=None, clb_range=None, dcolormap='cmc.bilbao', plt_style='contourf', plt_levels=None, plt_contours=True, plot_names=True, station_marker_size=100, use_warnings=True)[source]#
Plots magnitude sensitivity in map or side view with stations plotted as non-filled triangles with name labels.
- Parameters:
- sens_data
numpy.ndarray Data for sensitivity map
- xi
numpy.ndarray, optional Vector of x coordinates for sensitivity
- yi
numpy.ndarray, optional Vector of y coordinates for sensitivity
- zi
numpy.ndarray, optional Vector of z coordinates for sensitivity
- geometry_df
pandas.dataframe, optional Geometry data frame containing station names and coordinates
- plot_title
str, optional Plot title (default: ‘Magnitude sensitivity slice’)
- clb_title
str, optional Colorbar title (default: ‘$M_w$’)
- clb_range
tuple, optional Colorbar range (default: automatic)
- dcolormap
strormatplotlib.colors.Colormap, default: ‘cmc.batlow’ Data colormap to use for the plot
- plt_style
str, {‘contourf’,’imshow’}, optional, default: ‘contourf’ Plot style
- plt_levels
int, optional, default: 21 if None Number of levels to plot in contours within the colorbar range. Has no effect on imshow
- plt_contours
bool, optional, default: True Flag to plot contours
- 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
- use_warnings: :obj:`bool`, optional, default: True
If True, enable warnings, if False, disable them
- sens_data
- 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
- Raises:
- ValueError
if two or more coordinate vectors are None
- ValueError
if all three coordinate vectors are not None
- ValueError
if clb_range is not a tuple with two numeric values
- ValueError
if plt_style is not from the list of possible types