# Vline ¶

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


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:

In [2]:
%%opts VLine (color='red' linewidth=6) Curve (color='#D3D3D3')
xs = np.linspace(-5,5,100)
ys = -(xs-2)**2
hv.Curve((xs,ys)) * hv.VLine(xs[ys.argmax()])

Out[2]: