{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from bokeh.io import output_notebook, show\n",
    "from bokeh.layouts import gridplot\n",
    "from bokeh.plotting import figure\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = list(range(11))\n",
    "y0 = x\n",
    "y1 = [10-xx for xx in x]\n",
    "y2 = [abs(xx-5) for xx in x]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# create a new plot\n",
    "s1 = figure(width=250, plot_height=250, title=None)\n",
    "s1.circle(x, y0, size=10, color=\"navy\", alpha=0.5)\n",
    "\n",
    "# create a new plot and share both ranges\n",
    "s2 = figure(width=250, height=250, x_range=s1.x_range, y_range=s1.y_range, title=None)\n",
    "s2.triangle(x, y1, size=10, color=\"firebrick\", alpha=0.5)\n",
    "\n",
    "# create a new plot and share only one range\n",
    "s3 = figure(width=250, height=250, x_range=s1.x_range, title=None)\n",
    "s3.square(x, y2, size=10, color=\"olive\", alpha=0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "p = gridplot([[s1, s2, s3]], toolbar_location=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
