plot_heatmap#
- gammapy.visualization.plot_heatmap(data, row_labels, col_labels, ax=None, cbar_kw=None, cbarlabel='', **kwargs)[source]#
Create a heatmap from a numpy array and two lists of labels.
- Parameters:
- data
ndarray
Data array.
- row_labelslist or
ndarray
List or array of labels for the rows.
- col_labelslist or
ndarray
List or array of labels for the columns.
- ax
matplotlib.axes.Axes
, optional Axis instance to which the heatmap is plotted. Default is None. If None, the current one is used.
- cbar_kwdict, optional
A dictionary with arguments to
matplotlib.Figure.colorbar
. Default is None.- cbarlabelstr, optional
The label for the color bar. Default is “”.
- **kwargsdict, optional
Other keyword arguments forwarded to
matplotlib.axes.Axes.imshow
.
- data