hvPlot.heatmap#

hvPlot.heatmap(x=None, y=None, C=None, colorbar=True, logz=False, **kwds)[source]#

heatmap visualises tabular data indexed by two key dimensions as a grid of colored values. This allows spotting correlations in multivariate data and provides a high-level overview of how the two variables are plotted.

Reference: https://hvplot.holoviz.org/reference/tabular/heatmap.html

Parameters:
xstring, optional

Field name to draw x coordinates from. If not specified, the index is used. Can refer to continuous and categorical data.

ystring

Field name to draw y-positions from. Can refer to continuous and categorical data.

Cstring, optional

Field to draw heatmap color from. If not specified a simple count will be used.

colorbar: boolean, optional

Whether to display a colorbar. Default is True.

logzbool

Whether to apply log scaling to the z-axis. Default is False.

reduce_functionfunction, optional

Function to compute statistics for heatmap, for example np.mean. If omitted, no aggregation is applied and duplicate values are dropped.

**kwdsoptional

Additional keywords arguments are documented in hvplot.help(‘heatmap’). See Plotting Options for more information.

Returns:
holoviews.element.HeatMap / Panel object

You can print the object to study its composition and run:

import holoviews as hv
hv.help(the_holoviews_object)

to learn more about its parameters and options.

References

Examples

import hvplot.pandas
import numpy as np
from bokeh.sampledata import sea_surface_temperature as sst

df = sst.sea_surface_temperature
df.hvplot.heatmap(
    x="time.month", y="time.day", C="temperature", reduce_function=np.mean,
    height=500, width=500, colorbar=False, cmap="blues"
)

Backend-specific styling options#

alpha, annular_alpha, annular_color, annular_fill_alpha, annular_fill_color, annular_hover_alpha, annular_hover_color, annular_hover_fill_alpha, annular_hover_fill_color, annular_hover_line_alpha, annular_hover_line_cap, annular_hover_line_color, annular_hover_line_dash, annular_hover_line_dash_offset, annular_hover_line_join, annular_hover_line_width, annular_line_alpha, annular_line_cap, annular_line_color, annular_line_dash, annular_line_dash_offset, annular_line_join, annular_line_width, annular_muted, annular_muted_alpha, annular_muted_color, annular_muted_fill_alpha, annular_muted_fill_color, annular_muted_line_alpha, annular_muted_line_cap, annular_muted_line_color, annular_muted_line_dash, annular_muted_line_dash_offset, annular_muted_line_join, annular_muted_line_width, annular_nonselection_alpha, annular_nonselection_color, annular_nonselection_fill_alpha, annular_nonselection_fill_color, annular_nonselection_line_alpha, annular_nonselection_line_cap, annular_nonselection_line_color, annular_nonselection_line_dash, annular_nonselection_line_dash_offset, annular_nonselection_line_join, annular_nonselection_line_width, annular_selection_alpha, annular_selection_color, annular_selection_fill_alpha, annular_selection_fill_color, annular_selection_line_alpha, annular_selection_line_cap, annular_selection_line_color, annular_selection_line_dash, annular_selection_line_dash_offset, annular_selection_line_join, annular_selection_line_width, annular_visible, cmap, color, dilate, fill_alpha, fill_color, hover_alpha, hover_color, hover_fill_alpha, hover_fill_color, hover_line_alpha, hover_line_cap, hover_line_color, hover_line_dash, hover_line_dash_offset, hover_line_join, hover_line_width, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, muted, muted_alpha, muted_color, muted_fill_alpha, muted_fill_color, muted_line_alpha, muted_line_cap, muted_line_color, muted_line_dash, muted_line_dash_offset, muted_line_join, muted_line_width, nonselection_alpha, nonselection_color, nonselection_fill_alpha, nonselection_fill_color, nonselection_line_alpha, nonselection_line_cap, nonselection_line_color, nonselection_line_dash, nonselection_line_dash_offset, nonselection_line_join, nonselection_line_width, selection_alpha, selection_color, selection_fill_alpha, selection_fill_color, selection_line_alpha, selection_line_cap, selection_line_color, selection_line_dash, selection_line_dash_offset, selection_line_join, selection_line_width, ticks_text_align, ticks_text_alpha, ticks_text_baseline, ticks_text_color, ticks_text_font, ticks_text_font_size, ticks_text_font_style, visible, xmarks_alpha, xmarks_color, xmarks_hover_alpha, xmarks_hover_color, xmarks_hover_line_alpha, xmarks_hover_line_cap, xmarks_hover_line_color, xmarks_hover_line_dash, xmarks_hover_line_dash_offset, xmarks_hover_line_join, xmarks_hover_line_width, xmarks_line_alpha, xmarks_line_cap, xmarks_line_color, xmarks_line_dash, xmarks_line_dash_offset, xmarks_line_join, xmarks_line_width, xmarks_muted, xmarks_muted_alpha, xmarks_muted_color, xmarks_muted_line_alpha, xmarks_muted_line_cap, xmarks_muted_line_color, xmarks_muted_line_dash, xmarks_muted_line_dash_offset, xmarks_muted_line_join, xmarks_muted_line_width, xmarks_nonselection_alpha, xmarks_nonselection_color, xmarks_nonselection_line_alpha, xmarks_nonselection_line_cap, xmarks_nonselection_line_color, xmarks_nonselection_line_dash, xmarks_nonselection_line_dash_offset, xmarks_nonselection_line_join, xmarks_nonselection_line_width, xmarks_selection_alpha, xmarks_selection_color, xmarks_selection_line_alpha, xmarks_selection_line_cap, xmarks_selection_line_color, xmarks_selection_line_dash, xmarks_selection_line_dash_offset, xmarks_selection_line_join, xmarks_selection_line_width, xmarks_visible, ymarks_alpha, ymarks_color, ymarks_hover_alpha, ymarks_hover_color, ymarks_hover_line_alpha, ymarks_hover_line_cap, ymarks_hover_line_color, ymarks_hover_line_dash, ymarks_hover_line_dash_offset, ymarks_hover_line_join, ymarks_hover_line_width, ymarks_line_alpha, ymarks_line_cap, ymarks_line_color, ymarks_line_dash, ymarks_line_dash_offset, ymarks_line_join, ymarks_line_width, ymarks_muted, ymarks_muted_alpha, ymarks_muted_color, ymarks_muted_line_alpha, ymarks_muted_line_cap, ymarks_muted_line_color, ymarks_muted_line_dash, ymarks_muted_line_dash_offset, ymarks_muted_line_join, ymarks_muted_line_width, ymarks_nonselection_alpha, ymarks_nonselection_color, ymarks_nonselection_line_alpha, ymarks_nonselection_line_cap, ymarks_nonselection_line_color, ymarks_nonselection_line_dash, ymarks_nonselection_line_dash_offset, ymarks_nonselection_line_join, ymarks_nonselection_line_width, ymarks_selection_alpha, ymarks_selection_color, ymarks_selection_line_alpha, ymarks_selection_line_cap, ymarks_selection_line_color, ymarks_selection_line_dash, ymarks_selection_line_dash_offset, ymarks_selection_line_join, ymarks_selection_line_width, ymarks_visible

alpha, annular_edgecolors, annular_linewidth, clims, cmap, ec, edgecolor, edgecolors, hatch, linestyles, linewidths, norm, shading, visible, xmarks_edgecolor, xmarks_linewidth, ymarks_edgecolor, ymarks_linewidth

Examples#

TBD

This web page was generated from a Jupyter notebook and not all interactivity will work on this website.