import numpy as np
import holoviews as hv
hv.extension('matplotlib')
The HLines
element is a type of annotation that can mark multiple lines along the y-axis. It accepts a list of y-coordinates and will draw a horizontal line at each location. This has the advantage over HLine
of being able to draw multiple lines at once.
ys = np.random.normal(size=10)
hv.HLines(ys).opts(color='red')
For full documentation and the available style and plot options, use hv.help(hv.HLines).