{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from bokeh.plotting import figure, show, output_notebook"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## algorithm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def probability(n):\n",
    "    # initial probabilities\n",
    "    p = [0, 0, 0, 0, 0, 1]\n",
    "    \n",
    "    # next field is conditioned on previous six fields\n",
    "    for _ in range(n):\n",
    "        p.append(sum(p[-6:]) / 6)\n",
    "\n",
    "    return p[6:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## run"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "fields = probability(24)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"3655099f-822b-4a5f-904f-bfd9ca0ea296\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(global) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = true;\n",
       "\n",
       "  if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    window._bokeh_onload_callbacks = [];\n",
       "    window._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "\n",
       "  \n",
       "  if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    window._bokeh_timeout = Date.now() + 5000;\n",
       "    window._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    if (window.Bokeh !== undefined) {\n",
       "      document.getElementById(\"3655099f-822b-4a5f-904f-bfd9ca0ea296\").textContent = \"BokehJS successfully loaded.\";\n",
       "    } else if (Date.now() < window._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function run_callbacks() {\n",
       "    window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    delete window._bokeh_onload_callbacks\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    window._bokeh_onload_callbacks.push(callback);\n",
       "    if (window._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    window._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        window._bokeh_is_loading--;\n",
       "        if (window._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };var element = document.getElementById(\"3655099f-822b-4a5f-904f-bfd9ca0ea296\");\n",
       "  if (element == null) {\n",
       "    console.log(\"Bokeh: ERROR: autoload.js configured with elementid '3655099f-822b-4a5f-904f-bfd9ca0ea296' but no matching script tag was found. \")\n",
       "    return false;\n",
       "  }\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    \n",
       "    function(Bokeh) {\n",
       "      \n",
       "      document.getElementById(\"3655099f-822b-4a5f-904f-bfd9ca0ea296\").textContent = \"BokehJS is loading...\";\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((window.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i](window.Bokeh);\n",
       "      }if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < window._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!window._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      window._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"3655099f-822b-4a5f-904f-bfd9ca0ea296\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (window._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(this));"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <div class=\"bk-plotdiv\" id=\"14c9c1f6-d54b-4b97-abe8-d794984b15ba\"></div>\n",
       "    </div>\n",
       "<script type=\"text/javascript\">\n",
       "  \n",
       "  (function(global) {\n",
       "    function now() {\n",
       "      return new Date();\n",
       "    }\n",
       "  \n",
       "    var force = false;\n",
       "  \n",
       "    if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "      window._bokeh_onload_callbacks = [];\n",
       "      window._bokeh_is_loading = undefined;\n",
       "    }\n",
       "  \n",
       "  \n",
       "    \n",
       "    if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "      window._bokeh_timeout = Date.now() + 0;\n",
       "      window._bokeh_failed_load = false;\n",
       "    }\n",
       "  \n",
       "    var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "       \"<div style='background-color: #fdd'>\\n\"+\n",
       "       \"<p>\\n\"+\n",
       "       \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "       \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "       \"</p>\\n\"+\n",
       "       \"<ul>\\n\"+\n",
       "       \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "       \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "       \"</ul>\\n\"+\n",
       "       \"<code>\\n\"+\n",
       "       \"from bokeh.resources import INLINE\\n\"+\n",
       "       \"output_notebook(resources=INLINE)\\n\"+\n",
       "       \"</code>\\n\"+\n",
       "       \"</div>\"}};\n",
       "  \n",
       "    function display_loaded() {\n",
       "      if (window.Bokeh !== undefined) {\n",
       "        document.getElementById(\"14c9c1f6-d54b-4b97-abe8-d794984b15ba\").textContent = \"BokehJS successfully loaded.\";\n",
       "      } else if (Date.now() < window._bokeh_timeout) {\n",
       "        setTimeout(display_loaded, 100)\n",
       "      }\n",
       "    }\n",
       "  \n",
       "    function run_callbacks() {\n",
       "      window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "      delete window._bokeh_onload_callbacks\n",
       "      console.info(\"Bokeh: all callbacks have finished\");\n",
       "    }\n",
       "  \n",
       "    function load_libs(js_urls, callback) {\n",
       "      window._bokeh_onload_callbacks.push(callback);\n",
       "      if (window._bokeh_is_loading > 0) {\n",
       "        console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "        return null;\n",
       "      }\n",
       "      if (js_urls == null || js_urls.length === 0) {\n",
       "        run_callbacks();\n",
       "        return null;\n",
       "      }\n",
       "      console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "      window._bokeh_is_loading = js_urls.length;\n",
       "      for (var i = 0; i < js_urls.length; i++) {\n",
       "        var url = js_urls[i];\n",
       "        var s = document.createElement('script');\n",
       "        s.src = url;\n",
       "        s.async = false;\n",
       "        s.onreadystatechange = s.onload = function() {\n",
       "          window._bokeh_is_loading--;\n",
       "          if (window._bokeh_is_loading === 0) {\n",
       "            console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "            run_callbacks()\n",
       "          }\n",
       "        };\n",
       "        s.onerror = function() {\n",
       "          console.warn(\"failed to load library \" + url);\n",
       "        };\n",
       "        console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      }\n",
       "    };var element = document.getElementById(\"14c9c1f6-d54b-4b97-abe8-d794984b15ba\");\n",
       "    if (element == null) {\n",
       "      console.log(\"Bokeh: ERROR: autoload.js configured with elementid '14c9c1f6-d54b-4b97-abe8-d794984b15ba' but no matching script tag was found. \")\n",
       "      return false;\n",
       "    }\n",
       "  \n",
       "    var js_urls = [];\n",
       "  \n",
       "    var inline_js = [\n",
       "      function(Bokeh) {\n",
       "        (function() {\n",
       "          var fn = function() {\n",
       "            var docs_json = {\"a9924ccd-9443-45f6-9360-fb660a2b9d68\":{\"roots\":{\"references\":[{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"ed524e02-fa07-4c2f-82cd-0de0d50bfb99\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"overlay\":{\"id\":\"ed524e02-fa07-4c2f-82cd-0de0d50bfb99\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"3e401167-22e2-471b-8217-1b47c303c6ec\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"b6d02bb7-90cf-456b-a5ac-42dbcb7d3bb6\",\"type\":\"HelpTool\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"6afc6a74-5729-4633-8753-5cf780ec651b\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"db73f1ac-05cb-46b4-ab29-7fa10e0ea58b\",\"type\":\"ToolEvents\"},{\"attributes\":{},\"id\":\"53d7e903-3389-4352-a203-e10688ae016a\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"c2c484ef-6c75-4f69-acba-fccdcb21ca9b\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null},\"id\":\"242f2dd3-d112-45cd-9681-681a7efbb07f\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null,\"end\":0.5},\"id\":\"97e62014-0f19-44e9-a506-1d6e83902d76\",\"type\":\"Range1d\"},{\"attributes\":{\"below\":[{\"id\":\"514a864f-24fe-4df1-8370-48c56f86de5e\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"ac30856b-ca1c-40a6-ab16-f86b6718aad7\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"514a864f-24fe-4df1-8370-48c56f86de5e\",\"type\":\"LinearAxis\"},{\"id\":\"bd5736b4-4e05-49e7-a3b0-a94d9ca032f4\",\"type\":\"Grid\"},{\"id\":\"ac30856b-ca1c-40a6-ab16-f86b6718aad7\",\"type\":\"LinearAxis\"},{\"id\":\"09532312-128d-402c-9530-78b775775961\",\"type\":\"Grid\"},{\"id\":\"ed524e02-fa07-4c2f-82cd-0de0d50bfb99\",\"type\":\"BoxAnnotation\"},{\"id\":\"8b0ef9ba-b37c-41ab-9520-1556a9b9f1d1\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"ae518d99-6044-40a1-b7cb-32cb24f6db95\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"db73f1ac-05cb-46b4-ab29-7fa10e0ea58b\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"ea0dd2cc-3dac-44cd-88e1-46a0397e34c1\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"242f2dd3-d112-45cd-9681-681a7efbb07f\",\"type\":\"DataRange1d\"},\"y_range\":{\"id\":\"97e62014-0f19-44e9-a506-1d6e83902d76\",\"type\":\"Range1d\"}},\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"755476e2-9d68-4053-a64a-b13472f7f4a7\",\"type\":\"PanTool\"},{\"id\":\"8937aae2-3508-4def-b1c3-4a960392aaf2\",\"type\":\"WheelZoomTool\"},{\"id\":\"3e401167-22e2-471b-8217-1b47c303c6ec\",\"type\":\"BoxZoomTool\"},{\"id\":\"59a772b6-f9b3-4703-8a6c-34e2d60556a6\",\"type\":\"SaveTool\"},{\"id\":\"6afc6a74-5729-4633-8753-5cf780ec651b\",\"type\":\"ResetTool\"},{\"id\":\"b6d02bb7-90cf-456b-a5ac-42dbcb7d3bb6\",\"type\":\"HelpTool\"}]},\"id\":\"ea0dd2cc-3dac-44cd-88e1-46a0397e34c1\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"ee71e1d3-08c8-44fb-ba14-abaf1dbc3eda\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"formatter\":{\"id\":\"ee71e1d3-08c8-44fb-ba14-abaf1dbc3eda\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"bd4eeee3-1436-4995-be0e-6286b4cd8202\",\"type\":\"BasicTicker\"}},\"id\":\"514a864f-24fe-4df1-8370-48c56f86de5e\",\"type\":\"LinearAxis\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"8937aae2-3508-4def-b1c3-4a960392aaf2\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"ae518d99-6044-40a1-b7cb-32cb24f6db95\",\"type\":\"Title\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"755476e2-9d68-4053-a64a-b13472f7f4a7\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"bd4eeee3-1436-4995-be0e-6286b4cd8202\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1c869266-0713-441d-94bb-cdf814da84e6\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"659d551b-fa00-4ce2-b0b0-b9b2d09464ea\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1c869266-0713-441d-94bb-cdf814da84e6\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"c2c484ef-6c75-4f69-acba-fccdcb21ca9b\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"8b0ef9ba-b37c-41ab-9520-1556a9b9f1d1\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"bd4eeee3-1436-4995-be0e-6286b4cd8202\",\"type\":\"BasicTicker\"}},\"id\":\"bd5736b4-4e05-49e7-a3b0-a94d9ca032f4\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],\"y\":[0.16666666666666666,0.19444444444444445,0.22685185185185186,0.2646604938271605,0.30877057613168724,0.36023233882030176,0.25360439529035206,0.26809401672763294,0.28036894544149776,0.289288461039772,0.29339312224187397,0.29083021326023845,0.27926319233356117,0.2835396585074294,0.2861139321373955,0.2870714299200451,0.28670192473342393,0.2855867251486823,0.2847128104634229,0.2856210801517332,0.28596798375911714,0.28594365902940405,0.2857556972142972,0.28559799262777613]}},\"id\":\"659d551b-fa00-4ce2-b0b0-b9b2d09464ea\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"formatter\":{\"id\":\"53d7e903-3389-4352-a203-e10688ae016a\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"6474ee69-5f02-462c-99be-837b87d0bf64\",\"type\":\"BasicTicker\"}},\"id\":\"ac30856b-ca1c-40a6-ab16-f86b6718aad7\",\"type\":\"LinearAxis\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"6474ee69-5f02-462c-99be-837b87d0bf64\",\"type\":\"BasicTicker\"}},\"id\":\"09532312-128d-402c-9530-78b775775961\",\"type\":\"Grid\"},{\"attributes\":{\"plot\":{\"id\":\"aa931700-85b9-4890-afb3-ca516f6d5581\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"59a772b6-f9b3-4703-8a6c-34e2d60556a6\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"6474ee69-5f02-462c-99be-837b87d0bf64\",\"type\":\"BasicTicker\"}],\"root_ids\":[\"aa931700-85b9-4890-afb3-ca516f6d5581\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.4\"}};\n",
       "            var render_items = [{\"docid\":\"a9924ccd-9443-45f6-9360-fb660a2b9d68\",\"elementid\":\"14c9c1f6-d54b-4b97-abe8-d794984b15ba\",\"modelid\":\"aa931700-85b9-4890-afb3-ca516f6d5581\"}];\n",
       "            \n",
       "            Bokeh.embed.embed_items(docs_json, render_items);\n",
       "          };\n",
       "          if (document.readyState != \"loading\") fn();\n",
       "          else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "        })();\n",
       "      },\n",
       "      function(Bokeh) {\n",
       "      }\n",
       "    ];\n",
       "  \n",
       "    function run_inline_js() {\n",
       "      \n",
       "      if ((window.Bokeh !== undefined) || (force === true)) {\n",
       "        for (var i = 0; i < inline_js.length; i++) {\n",
       "          inline_js[i](window.Bokeh);\n",
       "        }if (force === true) {\n",
       "          display_loaded();\n",
       "        }} else if (Date.now() < window._bokeh_timeout) {\n",
       "        setTimeout(run_inline_js, 100);\n",
       "      } else if (!window._bokeh_failed_load) {\n",
       "        console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "        window._bokeh_failed_load = true;\n",
       "      } else if (force !== true) {\n",
       "        var cell = $(document.getElementById(\"14c9c1f6-d54b-4b97-abe8-d794984b15ba\")).parents('.cell').data().cell;\n",
       "        cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "      }\n",
       "  \n",
       "    }\n",
       "  \n",
       "    if (window._bokeh_is_loading === 0) {\n",
       "      console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "      run_inline_js();\n",
       "    } else {\n",
       "      load_libs(js_urls, function() {\n",
       "        console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "        run_inline_js();\n",
       "      });\n",
       "    }\n",
       "  }(this));\n",
       "</script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "output_notebook()\n",
    "\n",
    "plot = figure(y_range=(0, .5))\n",
    "plot.scatter(x=range(1, 25), y=fields)\n",
    "show(plot)"
   ]
  },
  {
   "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.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}