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_datanumpy.ndarray

Data for sensitivity map

xinumpy.ndarray, optional

Vector of x coordinates for sensitivity

yinumpy.ndarray, optional

Vector of y coordinates for sensitivity

zinumpy.ndarray, optional

Vector of z coordinates for sensitivity

geometry_dfpandas.dataframe, optional

Geometry data frame containing station names and coordinates

plot_titlestr, optional

Plot title (default: ‘Magnitude sensitivity slice’)

clb_titlestr, optional

Colorbar title (default: ‘$M_w$’)

clb_rangetuple, optional

Colorbar range (default: automatic)

dcolormapstr or matplotlib.colors.Colormap, default: ‘cmc.batlow’

Data colormap to use for the plot

plt_stylestr, {‘contourf’,’imshow’}, optional, default: ‘contourf’

Plot style

plt_levelsint, optional, default: 21 if None

Number of levels to plot in contours within the colorbar range. Has no effect on imshow

plt_contoursbool, optional, default: True

Flag to plot contours

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

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.

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