{
 "metadata": {
  "name": "",
  "signature": "sha256:3236493f8077f0176d9644e562801d956b15febdb3a13e45e704f4754c2577f3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from bokeh.plotting import scatter, output_notebook, show, gridplot\n",
      "from bokeh.objects import ColumnDataSource\n",
      "import numpy as np\n",
      "output_notebook()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "N=100\n",
      "x = np.linspace(0, 4*np.pi, N)\n",
      "y = np.sin(x)\n",
      "z = np.cos(x)\n",
      "source = ColumnDataSource()\n",
      "source.add(data=x, name='x')\n",
      "source.add(data=y, name='y')\n",
      "source.add(data=z, name='z')\n",
      "s1 = scatter('x', 'y', source=source, width=300, height=300)\n",
      "#note that s2 shares the same x data source, but has a different y\n",
      "s2 = scatter('x', 'z', source=source, width=300, height=300)\n",
      "gridplot([[s1,s2]])\n",
      "show()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}