hvPlot.bivariate#

hvPlot.bivariate(x=None, y=None, colorbar=True, bandwidth=None, cut=3, filled=False, levels=10, **kwds)[source]#

A bivariate, density plot uses nested contours (or contours plus colors) to indicate regions of higher local density.

bivariate plots can be a useful alternative to scatter plots, if your data are too dense to plot each point individually.

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

Parameters:
xstring, optional

Field name to draw x-positions from. If not specified, the index is used.

ystring, optional

Field name to draw y-positions from

colorbar: boolean

Whether to display a colorbar

bandwidth: int, optional

The bandwidth of the kernel for the density estimate. Default is None.

cut: int, optional

Draw the estimate to cut * bw from the extreme data points. Default is 3.

filledbool, optional

If True the contours will be filled. Default is False.

levels: int or list, optional

The number of contour lines to draw or a list of scalar values used to specify the contour levels. Default is 10.

**kwdsoptional

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

Returns:
holoviews.element.Bivariate / 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
from bokeh.sampledata.autompg import autompg_clean as df

bivariate = df.hvplot.bivariate("accel", "mpg", filled=True, cmap="blues")
bivariate

To get a better intuitive understanding of the bivariate plot, you can try overlaying the corresponding scatter plot.

scatter = df.hvplot.scatter("accel", "mpg")
bivariate * scatter

Backend-specific styling options#

alpha, cmap, color, 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, visible

alpha, c, capstyle, cmap, color, ec, ecolor, edgecolor, facecolor, fc, fill, hatch, joinstyle, linestyle, linewidth, lw

Examples#

TBD

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