From e1232e52c90edffd77f421f91b8eb052d0dda7d8 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Tue, 18 Oct 2016 23:56:02 -0500 Subject: [PATCH 1/2] Update to Bokeh latest (0.12.3) and fix test plot --- etc/notebooks/test/test_plotting_libs.ipynb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/etc/notebooks/test/test_plotting_libs.ipynb b/etc/notebooks/test/test_plotting_libs.ipynb index cad880c..820ef1b 100644 --- a/etc/notebooks/test/test_plotting_libs.ipynb +++ b/etc/notebooks/test/test_plotting_libs.ipynb @@ -222,7 +222,7 @@ }, "outputs": [], "source": [ - "!pip install bokeh==0.11.1" + "!pip install bokeh" ] }, { @@ -251,8 +251,9 @@ "outputs": [], "source": [ "import bokeh\n", + "from bokeh.io import output_notebook, push_notebook, show\n", "from bokeh.models import ColumnDataSource\n", - "from bokeh.plotting import figure, show, output_notebook" + "from bokeh.plotting import figure" ] }, { @@ -324,7 +325,7 @@ "source = ColumnDataSource(data=dict(x=x, y=y))\n", "\n", "p = figure(title=\"Bokeh example\", plot_height=300, plot_width=600)\n", - "p.line(x, y, color=\"#2222aa\", line_width=3, source=source, name=\"foo\")" + "p.line('x', 'y', color=\"#2222aa\", line_width=3, source=source, name=\"foo\")" ] }, { @@ -357,7 +358,7 @@ " elif f == \"cos\": func = np.cos\n", " elif f == \"tan\": func = np.tan\n", " source.data['y'] = A * func(w * x + phi)\n", - " source.push_notebook()" + " push_notebook(handle=handle)" ] }, { @@ -385,7 +386,7 @@ }, "outputs": [], "source": [ - "show(p)" + "handle = show(p, notebook_handle=True)" ] }, { @@ -413,7 +414,7 @@ }, "outputs": [], "source": [ - "from IPython.html.widgets import interact\n", + "from ipywidgets import interact\n", "_ = interact(update, f=[\"sin\", \"cos\", \"tan\"], w=(0,100), A=(1,10), phi=(0, 10, 0.1))" ] }, @@ -622,7 +623,7 @@ "views": [] } }, - "version": "1.1.2" + "version": "1.2.0" } }, "nbformat": 4, From b118db8577d38c033a5dc27c778de3cee4b151e2 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Wed, 19 Oct 2016 16:33:18 -0500 Subject: [PATCH 2/2] Pin to Bokeh 0.12.3 --- etc/notebooks/test/test_plotting_libs.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/notebooks/test/test_plotting_libs.ipynb b/etc/notebooks/test/test_plotting_libs.ipynb index 820ef1b..db416b9 100644 --- a/etc/notebooks/test/test_plotting_libs.ipynb +++ b/etc/notebooks/test/test_plotting_libs.ipynb @@ -222,7 +222,7 @@ }, "outputs": [], "source": [ - "!pip install bokeh" + "!pip install bokeh==0.12.3" ] }, {