Hline

Title
HLine Element
Dependencies
Matplotlib
Backends
Matplotlib
Bokeh
In [1]:
import numpy as np
import holoviews as hv
hv.extension('matplotlib')

The HLine element is a type of annotation that marks a position along the y-axis. Here is an HLine element that marks the mean of a points distributions:

In [2]:
%%opts HLine (color='blue' linewidth=6) Points (color='#D3D3D3')
xs = np.random.normal(size=100)
ys = np.random.normal(size=100) * xs
hv.Points((xs,ys)) * hv.HLine(ys.mean())
Out[2]:

Download this notebook from GitHub (right-click to download).