pymovements.utils.plotting.setup_matplotlib#
- pymovements.utils.plotting.setup_matplotlib(x_signal: ndarray, y_signal: ndarray, figsize: tuple[int, int], cmap: Colormap | None = None, cmap_norm: Normalize | str | None = None, cmap_segmentdata: dict[Literal['red', 'green', 'blue', 'alpha'], Sequence[tuple[float, ...]]] | None = None, cval: ndarray | None = None, show_cbar: bool = False, add_stimulus: bool = False, path_to_image_stimulus: str | None = None, stimulus_origin: str = 'upper', padding: float | None = None, pad_factor: float | None = 0.05) tuple[figure, Axes, Colormap, TwoSlopeNorm | Normalize | NoNorm, ndarray, bool][source]#
Configure cmap.
Deprecated since version v0.22.0: This function will be removed in v0.27.0.
- Parameters:
x_signal (np.ndarray) – Time-step array.
y_signal (np.ndarray) – Time-step array.
cmap (colors.Colormap | None) – Color map for line color values. (default: None)
cmap_norm (colors.Normalize | str | None) – Normalization for color values. (default: None)
cmap_segmentdata (LinearSegmentedColormapType | None) – Color map segmentation to build color map. (default: None)
cval (np.ndarray | None) – Line color values. (default: None)
show_cbar (bool) – Shows color bar if True. (default: False)
add_stimulus (bool) – Boolean value indicating whether to plot the scanpath on the stimulus. (default: False)
path_to_image_stimulus (str | None) – Path of the stimulus to be shown. (default: None)
stimulus_origin (str) – Origin of stimulus to plot on the stimulus. (default: ‘upper’)
padding (float | None) – Absolute padding value. If None, it is inferred from pad_factor and limits. (default: None)
pad_factor (float | None) – Relative padding factor to construct padding from value. (default: 0.05)
- Returns:
MatplotlibSetupType – Configures fig, ax, cmap, cmap_norm, cmap_segmentdata, cval, and show_cbar.
.. deprecated:: v0.22.0 – This function will be removed in v0.27.0.