{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### **Title**: HLine Element\n",
    "\n",
    "**Dependencies**: Bokeh 3.2\n",
    "\n",
    "**Backends**: [Matplotlib](../matplotlib/VSpans.ipynb), [Bokeh](../bokeh/VSpans.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 ``VSpans`` element is a type of annotation that can mark multiple spans along the x-axis. It accepts a list of start and end x-coordinates and will draw vertical spans at each location. This has the advantage over [``VSpan``](./VSpan.ipynb) of being able to draw multiple spans at once and also being able to get hover information for each of the span."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_start = np.arange(10)\n",
    "x_end = x_start + np.random.random(size=10) / 2\n",
    "hv.VSpans((x_start, x_end)).opts(tools=['hover'], color='red')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For full documentation and the available style and plot options, use ``hv.help(hv.VSpans).``"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
