mpl_interactions.heatmap_slicer¶
-
heatmap_slicer
(X, Y, heatmaps, slices='horizontal', heatmap_names=None, cmap=None, vmin=None, vmax=None, figsize=(18, 9), linecolor='k', labels=('X', 'Y'), interaction_type='move', fig=None)[source]¶ Compare horizontal and/or vertical slices across multiple arrays.
- Parameters
X,Y (1D array)
heatmaps (array_like) – must be 2-D or 3-D. If 3-D the last two axes should be (X,Y)
slices ({‘horizontal’, ‘vertical’, ‘both’}) – Direction to draw slice on heatmap. both will draw horizontal and vertical traces on the same plot, while both_separate will make a line plot for each.
heatmap_names ((String, String, …)) – An iterable with the names of the heatmaps. If provided it must have as many names as there are heatmaps
cmap (str or Colormap, optional) – A Colormap instance or registered colormap name.
vmin, vmax (float, optional) – The colorbar range. If None, suitable min/max values are automatically chosen by the Normalize instance.
figsize (tuple of number, default: (18, 9)) – The size of the created figure. Ignored if fig is not None.
linecolor (colorlike, default: ‘k’) – The color of the cursor showing the slices. Must be a valid Matplotlib linecolor.
labels ((string, string), default: (“X”, “Y”)) – The labels for the x and y axes.
interaction_type (str) – Update on mouse movement or mouse click. Options are {‘move’,’click’}
fig (matplotlib figure, optional) – The figure to use for the heatmap_slicer. Useful when embedding into a gui. If you are embedding into a gui make sure you set up the gui canvas first and then pass the figure to this function
- Returns
fig (matplotlib.Figure.figure)
ax (tuple of matplotlib.axes.Axes)