File: C:/Users/fred/anaconda3/Lib/site-packages/holoviews/examples/reference/elements/bokeh/VLines.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### **Title**: HLine Element\n",
"\n",
"**Dependencies**: Bokeh 3.2\n",
"\n",
"**Backends**: [Matplotlib](../matplotlib/VLines.ipynb), [Bokeh](../bokeh/VLines.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"\n",
"hv.extension('bokeh')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The ``VLines`` element is a type of annotation that can mark multiple lines along the x-axis. It accepts a list of x-coordinates and will draw a vertical line at each location. This has the advantage over [``VLine``](./VLine.ipynb) of being able to draw multiple lines at once and also being able to get hover information for each of the line."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"xs = np.random.normal(size=10)\n",
"hv.VLines(xs).opts(tools=['hover'], color='red', line_width=5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For full documentation and the available style and plot options, use ``hv.help(hv.VLines).``"
]
}
],
"metadata": {
"language_info": {
"name": "python",
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}