{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "URL: http://bokeh.pydata.org/en/latest/docs/gallery/dot.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import holoviews as hv\n",
    "hv.extension('bokeh')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Declare data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "factors = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"]\n",
    "x =  [50, 40, 65, 10, 25, 37, 80, 60]\n",
    "scatter = hv.Scatter((factors, x))\n",
    "spikes = hv.Spikes(scatter)\n",
    "\n",
    "x = [\"foo\", \"foo\", \"foo\", \"bar\", \"bar\", \"bar\", \"baz\", \"baz\", \"baz\"]\n",
    "y = [\"foo\", \"bar\", \"baz\", \"foo\", \"bar\", \"baz\", \"foo\", \"bar\", \"baz\"]\n",
    "z = [0, 1, 2, 3, 4, 5, 6, 7, 8]\n",
    "heatmap = hv.HeatMap((x, y, z))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%opts Layout [shared_axes=False]\n",
    "\n",
    "spike_plot = dict(labelled=[], invert_axes=True, color_index=None)\n",
    "spike_style = dict(color='green', line_width=4)\n",
    "scatter_style = dict(size=15, fill_color=\"orange\", line_color=\"green\")\n",
    "\n",
    "heatmap + spikes(plot=spike_plot, style=spike_style) * scatter(style=scatter_style)"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
