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

Title: VLine Element#

Dependencies: Bokeh

Backends: Matplotlib, Bokeh

import numpy as np
import holoviews as hv
from holoviews import opts

The VLine element is a type of annotation that marks a position along the x-axis. Here is a VLine marking the maximum of a quadratic curve:

xs = np.linspace(-5,5,100)
ys = -(xs-2)**2
overlay = hv.Curve((xs,ys)) * hv.VLine(xs[ys.argmax()])
    opts.VLine(color='red', line_width=6))

For full documentation and the available style and plot options, use hv.help(hv.VLine).

This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

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