waterfall

function of dascore.viz.waterfall source

waterfall(
    patch: Patch ,
    ax: matplotlib.axes._axes.Axes | None[Axes, None] = None,
    cmap = bwr,
    scale: float | collections.abc.Sequence[float, collections.abc.Sequence[float], None] = None,
    scale_type: Literal[‘relative’, ‘absolute’] = relative,
    log = False,
    show = False,
)-> ‘plt.Axes’

Create a waterfall plot of the Patch data.

Parameters

Parameter Description
patch The Patch object.
ax A matplotlib object, if None create one.
cmap A matplotlib colormap string or instance. Set to None to not plot the
colorbar.
scale If not None, controls the saturation level of the colorbar.
Values can either be a float, to set upper and lower limit to the same
value centered around the mean of the data, or a length 2 tuple
specifying upper and lower limits. See scale_type for controlling how
values are scaled.
scale_type Controls the type of scaling specified by scale parameter. Options
are:
relative - scale based on half the dynamic range in patch
absolute - scale based on absolute values provided to scale
log If True, visualize the common logarithm of the absolute values of patch data.
show If True, show the plot, else just return axis.

Examples

# Plot the default patch
import dascore as dc
patch = dc.get_example_patch()
_ = patch.viz.waterfall(scale=0.1)