From b0490fb89aac6720cac0ccddf7c68b80eb4b0949 Mon Sep 17 00:00:00 2001 From: Jean-Luc Stevens Date: Mon, 10 Dec 2018 22:29:26 -0600 Subject: [PATCH] Pass through bokeh examples gallery renaming .options to .opts (#3273) --- examples/gallery/demos/bokeh/area_chart.ipynb | 4 ++-- examples/gallery/demos/bokeh/autompg_histogram.ipynb | 4 ++-- examples/gallery/demos/bokeh/autompg_violins.ipynb | 2 +- .../demos/bokeh/bachelors_degrees_by_gender.ipynb | 2 +- examples/gallery/demos/bokeh/bars_economic.ipynb | 2 +- examples/gallery/demos/bokeh/box_draw_roi_editor.ipynb | 2 +- examples/gallery/demos/bokeh/boxplot_chart.ipynb | 2 +- .../gallery/demos/bokeh/choropleth_data_link.ipynb | 4 ++-- .../gallery/demos/bokeh/directed_airline_routes.ipynb | 2 +- examples/gallery/demos/bokeh/dot_example.ipynb | 2 +- examples/gallery/demos/bokeh/dragon_curve.ipynb | 6 +++--- examples/gallery/demos/bokeh/dropdown_economic.ipynb | 2 +- examples/gallery/demos/bokeh/emoji_tsne.ipynb | 2 +- examples/gallery/demos/bokeh/energy_sankey.ipynb | 2 +- .../gallery/demos/bokeh/hextile_movie_ratings.ipynb | 2 +- examples/gallery/demos/bokeh/histogram_example.ipynb | 5 +---- examples/gallery/demos/bokeh/image_range_tool.ipynb | 5 +++-- examples/gallery/demos/bokeh/iris_density_grid.ipynb | 2 +- examples/gallery/demos/bokeh/iris_example.ipynb | 2 +- examples/gallery/demos/bokeh/iris_grouped_grid.ipynb | 4 ++-- examples/gallery/demos/bokeh/iris_splom_example.ipynb | 2 +- examples/gallery/demos/bokeh/legend_example.ipynb | 10 +++++----- examples/gallery/demos/bokeh/lesmis_example.ipynb | 4 ++-- .../gallery/demos/bokeh/lorenz_attractor_example.ipynb | 2 +- examples/gallery/demos/bokeh/mandelbrot_section.ipynb | 4 +++- examples/gallery/demos/bokeh/measles_example.ipynb | 2 +- examples/gallery/demos/bokeh/network_graph.ipynb | 2 +- .../gallery/demos/bokeh/nyc_airport_connections.ipynb | 6 +++--- examples/gallery/demos/bokeh/nyc_radial_heatmap.ipynb | 2 +- .../gallery/demos/bokeh/point_draw_triangulate.ipynb | 2 +- examples/gallery/demos/bokeh/quiver_demo.ipynb | 6 +++--- examples/gallery/demos/bokeh/route_chord.ipynb | 2 +- examples/gallery/demos/bokeh/scatter_economic.ipynb | 2 +- examples/gallery/demos/bokeh/square_limit.ipynb | 2 +- examples/gallery/demos/bokeh/step_chart.ipynb | 2 +- examples/gallery/demos/bokeh/stocks_example.ipynb | 2 +- .../gallery/demos/bokeh/texas_choropleth_example.ipynb | 2 +- .../gallery/demos/bokeh/timeseries_range_tool.ipynb | 2 +- .../gallery/demos/bokeh/topographic_hillshading.ipynb | 2 +- examples/gallery/demos/bokeh/us_unemployment.ipynb | 2 +- examples/gallery/demos/bokeh/verhulst_mandelbrot.ipynb | 4 ++-- 41 files changed, 61 insertions(+), 61 deletions(-) diff --git a/examples/gallery/demos/bokeh/area_chart.ipynb b/examples/gallery/demos/bokeh/area_chart.ipynb index 3174da2a7a..b716ba721c 100644 --- a/examples/gallery/demos/bokeh/area_chart.ipynb +++ b/examples/gallery/demos/bokeh/area_chart.ipynb @@ -60,9 +60,9 @@ "metadata": {}, "outputs": [], "source": [ + "opts.defaults(opts.Area(fill_alpha=0.5))\n", "overlay = (python * pypy * jython)\n", - "layout = overlay.relabel(\"Area Chart\") + hv.Area.stack(overlay).relabel(\"Stacked Area Chart\")\n", - "layout.options(opts.Area(fill_alpha=0.5))" + "overlay.relabel(\"Area Chart\") + hv.Area.stack(overlay).relabel(\"Stacked Area Chart\")" ] } ], diff --git a/examples/gallery/demos/bokeh/autompg_histogram.ipynb b/examples/gallery/demos/bokeh/autompg_histogram.ipynb index e728c0c240..d84bee5256 100644 --- a/examples/gallery/demos/bokeh/autompg_histogram.ipynb +++ b/examples/gallery/demos/bokeh/autompg_histogram.ipynb @@ -53,8 +53,8 @@ "metadata": {}, "outputs": [], "source": [ - "hist = autompg_ds.hist(dimension='mpg', groupby='cyl', bin_range=(9, 46), bins=40, adjoin=False)\n", - "hist.options(opts.Histogram(alpha=0.9, width=600))" + "opts.defaults(opts.Histogram(alpha=0.9, width=600))\n", + "autompg_ds.hist(dimension='mpg', groupby='cyl', bin_range=(9, 46), bins=40, adjoin=False)" ] } ], diff --git a/examples/gallery/demos/bokeh/autompg_violins.ipynb b/examples/gallery/demos/bokeh/autompg_violins.ipynb index 880a1d864c..34b6a660e1 100644 --- a/examples/gallery/demos/bokeh/autompg_violins.ipynb +++ b/examples/gallery/demos/bokeh/autompg_violins.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "violin.options(height=500, width=900, violin_fill_color=dim('Year').str(), cmap='Set1')" + "violin.opts(height=500, width=900, violin_fill_color=dim('Year').str(), cmap='Set1')" ] } ], diff --git a/examples/gallery/demos/bokeh/bachelors_degrees_by_gender.ipynb b/examples/gallery/demos/bokeh/bachelors_degrees_by_gender.ipynb index 41a226d068..7a682ea46c 100644 --- a/examples/gallery/demos/bokeh/bachelors_degrees_by_gender.ipynb +++ b/examples/gallery/demos/bokeh/bachelors_degrees_by_gender.ipynb @@ -114,7 +114,7 @@ "\n", "gridstyle = {'grid_line_dash': [6, 4], 'grid_line_width': 3, 'grid_bounds': (0, 100)}\n", "\n", - "overlay.options(\n", + "overlay.opts(\n", " opts.Curve(show_frame=False, labelled=[], tools=['hover'],\n", " height=900, width=900, show_legend=False, xticks=[1970, 1980, 1990, 2000, 2010],\n", " color=hv.Cycle(values=color_sequence), line_width=2, show_grid=True, yformatter='%d%%'),\n", diff --git a/examples/gallery/demos/bokeh/bars_economic.ipynb b/examples/gallery/demos/bokeh/bars_economic.ipynb index c88a5c8181..a43aad952f 100644 --- a/examples/gallery/demos/bokeh/bars_economic.ipynb +++ b/examples/gallery/demos/bokeh/bars_economic.ipynb @@ -55,7 +55,7 @@ "outputs": [], "source": [ "bars = macro.to.bars(['Year', 'Country'], 'Trade', [])\n", - "bars.options(\n", + "bars.opts(\n", " opts.Bars(color=hv.Cycle('Category20'), show_legend=False, stacked=True, \n", " tools=['hover'], width=600, xrotation=90))" ] diff --git a/examples/gallery/demos/bokeh/box_draw_roi_editor.ipynb b/examples/gallery/demos/bokeh/box_draw_roi_editor.ipynb index aea6a8f8e2..a3c355d20b 100644 --- a/examples/gallery/demos/bokeh/box_draw_roi_editor.ipynb +++ b/examples/gallery/demos/bokeh/box_draw_roi_editor.ipynb @@ -77,7 +77,7 @@ "outputs": [], "source": [ "im = ds.to(hv.Image, ['x', 'y'], dynamic=True)\n", - "(im * polys + dmap * hlines).options(\n", + "(im * polys + dmap * hlines).opts(\n", " opts.Curve(width=400, framewise=True), \n", " opts.Polygons(fill_alpha=0.2, line_color='white'), \n", " opts.VLine(color='black'))" diff --git a/examples/gallery/demos/bokeh/boxplot_chart.ipynb b/examples/gallery/demos/bokeh/boxplot_chart.ipynb index d425a00930..b4140ea7e6 100644 --- a/examples/gallery/demos/bokeh/boxplot_chart.ipynb +++ b/examples/gallery/demos/bokeh/boxplot_chart.ipynb @@ -54,7 +54,7 @@ "metadata": {}, "outputs": [], "source": [ - "boxwhisker.options(show_legend=False, width=600, box_fill_color=dim('origin').str(), cmap='Set1')" + "boxwhisker.opts(show_legend=False, width=600, box_fill_color=dim('origin').str(), cmap='Set1')" ] } ], diff --git a/examples/gallery/demos/bokeh/choropleth_data_link.ipynb b/examples/gallery/demos/bokeh/choropleth_data_link.ipynb index ba5eef44e0..338066a45c 100644 --- a/examples/gallery/demos/bokeh/choropleth_data_link.ipynb +++ b/examples/gallery/demos/bokeh/choropleth_data_link.ipynb @@ -74,10 +74,10 @@ "# Link the choropleth and the table\n", "DataLink(choropleth, table)\n", "\n", - "(choropleth + table).options(\n", + "(choropleth + table).opts(\n", " opts.Table(height=428),\n", " opts.Polygons(width=500, height=500, tools=['hover', 'tap'], xaxis=None, \n", - " yaxis=None, color_index='Unemployment'), clone=False)" + " yaxis=None, color_index='Unemployment'))" ] } ], diff --git a/examples/gallery/demos/bokeh/directed_airline_routes.ipynb b/examples/gallery/demos/bokeh/directed_airline_routes.ipynb index e068c2ab47..040797adc5 100644 --- a/examples/gallery/demos/bokeh/directed_airline_routes.ipynb +++ b/examples/gallery/demos/bokeh/directed_airline_routes.ipynb @@ -64,7 +64,7 @@ "metadata": {}, "outputs": [], "source": [ - "(as_graph * labels).options(\n", + "(as_graph * labels).opts(\n", " opts.Graph(directed=True, node_size=8, padding=0.1, bgcolor='gray', xaxis=None, yaxis=None,\n", " edge_line_color='white', edge_line_width=1, width=800, height=800, arrowhead_length=0.01,\n", " node_fill_color='white', node_nonselection_fill_color='black'),\n", diff --git a/examples/gallery/demos/bokeh/dot_example.ipynb b/examples/gallery/demos/bokeh/dot_example.ipynb index e8ee9971e1..8736404dbf 100644 --- a/examples/gallery/demos/bokeh/dot_example.ipynb +++ b/examples/gallery/demos/bokeh/dot_example.ipynb @@ -55,7 +55,7 @@ "metadata": {}, "outputs": [], "source": [ - "(heatmap + spikes * scatter).options(\n", + "(heatmap + spikes * scatter).opts(\n", " opts.Scatter(size=15, fill_color=\"orange\", line_color=\"green\"),\n", " opts.Spikes(color='green', line_width=4, labelled=[], invert_axes=True, color_index=None),\n", " opts.Layout(shared_axes=False))" diff --git a/examples/gallery/demos/bokeh/dragon_curve.ipynb b/examples/gallery/demos/bokeh/dragon_curve.ipynb index e97852a028..1eef80b13b 100644 --- a/examples/gallery/demos/bokeh/dragon_curve.ipynb +++ b/examples/gallery/demos/bokeh/dragon_curve.ipynb @@ -112,9 +112,9 @@ "for i in range(7,17):\n", " hmap[i] = DragonCurve(-200, 0, i).path\n", "\n", - "hmap.options(\n", - " opts.Path(axiswise=False, color='black', framewise=True, line_width=1, \n", - " padding=0.1, title_format='', xaxis=None, yaxis=None))" + "hmap.opts(\n", + " opts.Path(axiswise=False, color='black', line_width=1, \n", + " padding=0.1, title_format='', xaxis=None, yaxis=None, framewise=True))" ] } ], diff --git a/examples/gallery/demos/bokeh/dropdown_economic.ipynb b/examples/gallery/demos/bokeh/dropdown_economic.ipynb index 72048f4cd0..8821af71b7 100644 --- a/examples/gallery/demos/bokeh/dropdown_economic.ipynb +++ b/examples/gallery/demos/bokeh/dropdown_economic.ipynb @@ -59,7 +59,7 @@ "annotations = hv.Arrow(1973, 8, 'Oil Crisis', 'v') * hv.Arrow(1975, 6, 'Stagflation', 'v') *\\\n", "hv.Arrow(1979, 8, 'Energy Crisis', 'v') * hv.Arrow(1981.9, 5, 'Early Eighties\\n Recession', 'v')\n", "\n", - "(gdp_curves * gdp_unem_scatter* annotations).options(\n", + "(gdp_curves * gdp_unem_scatter* annotations).opts(\n", " opts.Curve(color='k'), \n", " opts.Scatter(cmap='Blues', color='Unemployment', \n", " line_color='k', size=dim('Unemployment')*1.5),\n", diff --git a/examples/gallery/demos/bokeh/emoji_tsne.ipynb b/examples/gallery/demos/bokeh/emoji_tsne.ipynb index 16e5854893..2d328ec30b 100644 --- a/examples/gallery/demos/bokeh/emoji_tsne.ipynb +++ b/examples/gallery/demos/bokeh/emoji_tsne.ipynb @@ -48,7 +48,7 @@ "metadata": {}, "outputs": [], "source": [ - "emojis.options(width=1000, height=800, xaxis=None, yaxis=None)" + "emojis.opts(width=1000, height=800, xaxis=None, yaxis=None)" ] } ], diff --git a/examples/gallery/demos/bokeh/energy_sankey.ipynb b/examples/gallery/demos/bokeh/energy_sankey.ipynb index eeac13c648..2a133093e5 100644 --- a/examples/gallery/demos/bokeh/energy_sankey.ipynb +++ b/examples/gallery/demos/bokeh/energy_sankey.ipynb @@ -43,7 +43,7 @@ "outputs": [], "source": [ "sankey = hv.Sankey(edges, label='Energy Diagram')\n", - "sankey.options(label_position='left', edge_color='target', node_color='index', cmap='tab20')" + "sankey.opts(label_position='left', edge_color='target', node_color='index', cmap='tab20')" ] } ], diff --git a/examples/gallery/demos/bokeh/hextile_movie_ratings.ipynb b/examples/gallery/demos/bokeh/hextile_movie_ratings.ipynb index f204d7063b..ffc1852389 100644 --- a/examples/gallery/demos/bokeh/hextile_movie_ratings.ipynb +++ b/examples/gallery/demos/bokeh/hextile_movie_ratings.ipynb @@ -50,7 +50,7 @@ "metadata": {}, "outputs": [], "source": [ - "(hextiles * bivariate).options(\n", + "(hextiles * bivariate).opts(\n", " opts.Bivariate(show_legend=False),\n", " opts.HexTiles(width=500, height=500, min_count=0))" ] diff --git a/examples/gallery/demos/bokeh/histogram_example.ipynb b/examples/gallery/demos/bokeh/histogram_example.ipynb index 6d57840590..ac25be0303 100644 --- a/examples/gallery/demos/bokeh/histogram_example.ipynb +++ b/examples/gallery/demos/bokeh/histogram_example.ipynb @@ -118,11 +118,8 @@ "metadata": {}, "outputs": [], "source": [ - "options = {'Histogram': dict(fill_color=\"#036564\", axiswise=True, height=350, width=350, bgcolor=\"#E8DDCB\"),\n", - " 'Curve': dict(axiswise=True), 'Layout': dict(shared_axes=False)}\n", - "\n", "layout = (norm + lognorm + gamma + beta + weibull).cols(2)\n", - "layout.options(\n", + "layout.opts(\n", " opts.Curve(axiswise=True),\n", " opts.Histogram(fill_color=\"#036564\", axiswise=True, height=350, width=350, bgcolor=\"#E8DDCB\"),\n", " opts.Layout(shared_axes=False))" diff --git a/examples/gallery/demos/bokeh/image_range_tool.ipynb b/examples/gallery/demos/bokeh/image_range_tool.ipynb index a6b3ab9a0b..9a14b8dffc 100644 --- a/examples/gallery/demos/bokeh/image_range_tool.ipynb +++ b/examples/gallery/demos/bokeh/image_range_tool.ipynb @@ -88,8 +88,9 @@ "# Declare a RangeToolLink between the x- and y-axes of the two plots\n", "RangeToolLink(src, tgt, axes=['x', 'y'])\n", "\n", - "(tgt + src).options(\n", - " opts.Layout(shared_axes=False), clone=False)" + "(tgt + src).opts(\n", + " opts.Image(default_tools=[]),\n", + " opts.Layout(shared_axes=False))" ] } ], diff --git a/examples/gallery/demos/bokeh/iris_density_grid.ipynb b/examples/gallery/demos/bokeh/iris_density_grid.ipynb index 2eeaec079a..c380a5b7c4 100644 --- a/examples/gallery/demos/bokeh/iris_density_grid.ipynb +++ b/examples/gallery/demos/bokeh/iris_density_grid.ipynb @@ -55,7 +55,7 @@ "density_grid = gridmatrix(iris_ds, diagonal_type=hv.Distribution, chart_type=hv.Bivariate)\n", "point_grid = gridmatrix(iris_ds, chart_type=hv.Points)\n", "\n", - "(density_grid * point_grid).options(\n", + "(density_grid * point_grid).opts(\n", " opts.Bivariate(bandwidth=0.5, cmap='Blues'), \n", " opts.Points(size=2, tools=['box_select']))" ] diff --git a/examples/gallery/demos/bokeh/iris_example.ipynb b/examples/gallery/demos/bokeh/iris_example.ipynb index bce95c8c04..ce80c330b5 100644 --- a/examples/gallery/demos/bokeh/iris_example.ipynb +++ b/examples/gallery/demos/bokeh/iris_example.ipynb @@ -52,7 +52,7 @@ "metadata": {}, "outputs": [], "source": [ - "points.options(legend_position='right', toolbar='above', width=400)" + "points.opts(legend_position='right', toolbar='above', width=400)" ] } ], diff --git a/examples/gallery/demos/bokeh/iris_grouped_grid.ipynb b/examples/gallery/demos/bokeh/iris_grouped_grid.ipynb index b2d7ad311c..a408160ca5 100644 --- a/examples/gallery/demos/bokeh/iris_grouped_grid.ipynb +++ b/examples/gallery/demos/bokeh/iris_grouped_grid.ipynb @@ -17,7 +17,7 @@ "source": [ "import holoviews as hv\n", "from holoviews import opts\n", - "hv.extension('bokeh', width=95)" + "hv.extension('bokeh')" ] }, { @@ -55,7 +55,7 @@ "density_grid = gridmatrix(iris_ds, diagonal_type=hv.Distribution, chart_type=hv.Bivariate)\n", "point_grid = gridmatrix(iris_ds, chart_type=hv.Points)\n", "\n", - "(density_grid * point_grid).options(\n", + "(density_grid * point_grid).opts(\n", " opts.Bivariate(bandwidth=0.5, cmap=hv.Cycle(values=['Blues', 'Reds', 'Oranges'])),\n", " opts.Points(size=2, alpha=0.5),\n", " opts.NdOverlay(batched=False))" diff --git a/examples/gallery/demos/bokeh/iris_splom_example.ipynb b/examples/gallery/demos/bokeh/iris_splom_example.ipynb index 09c6f85dc3..da491e2c6c 100644 --- a/examples/gallery/demos/bokeh/iris_splom_example.ipynb +++ b/examples/gallery/demos/bokeh/iris_splom_example.ipynb @@ -57,7 +57,7 @@ "metadata": {}, "outputs": [], "source": [ - "grid.options(opts.Scatter(tools=['hover', 'box_select'], bgcolor='#efe8e2', fill_alpha=0.2, size=4))" + "grid.opts(opts.Scatter(tools=['hover', 'box_select'], bgcolor='#efe8e2', fill_alpha=0.2, size=4))" ] } ], diff --git a/examples/gallery/demos/bokeh/legend_example.ipynb b/examples/gallery/demos/bokeh/legend_example.ipynb index b5972aabe9..e05ab04571 100644 --- a/examples/gallery/demos/bokeh/legend_example.ipynb +++ b/examples/gallery/demos/bokeh/legend_example.ipynb @@ -40,13 +40,13 @@ "y = np.sin(x)\n", "\n", "scatter1 = hv.Scatter((x, y), label='sin(x)')\n", - "scatter2 = hv.Scatter((x, y*2), label='2*sin(x)').options(color='orange')\n", - "scatter3 = hv.Scatter((x, y*3), label='3*sin(x)').options(color='green')\n", - "scatter4 = hv.Scatter(scatter3).options(line_color='green', marker='square', fill_alpha=0, size=5)\n", + "scatter2 = hv.Scatter((x, y*2), label='2*sin(x)').opts(color='orange')\n", + "scatter3 = hv.Scatter((x, y*3), label='3*sin(x)').opts(color='green')\n", + "scatter4 = hv.Scatter(scatter3).opts(line_color='green', marker='square', fill_alpha=0, size=5)\n", "\n", "curve1 = hv.Curve(scatter1)\n", - "curve2 = hv.Curve(scatter2).options(line_dash=(4, 4), color='orange')\n", - "curve3 = hv.Curve(scatter3).options(color='orange')" + "curve2 = hv.Curve(scatter2).opts(line_dash=(4, 4), color='orange')\n", + "curve3 = hv.Curve(scatter3).opts(color='orange')" ] }, { diff --git a/examples/gallery/demos/bokeh/lesmis_example.ipynb b/examples/gallery/demos/bokeh/lesmis_example.ipynb index bf1c0169db..7ab687786b 100644 --- a/examples/gallery/demos/bokeh/lesmis_example.ipynb +++ b/examples/gallery/demos/bokeh/lesmis_example.ipynb @@ -77,7 +77,7 @@ " 'Purples', 'Oranges', 'Greys', 'Greys', 'PuRd', 'Reds', 'Greys']\n", "\n", "combined = hv.Overlay([o.options(cmap=cm).sort() for o, cm in zip(overlaid, cmaps)], label='LesMis Occurences')\n", - "styled = combined.options(\n", + "styled = combined.opts(\n", " opts.HeatMap(logz=True, clipping_colors={'NaN':(1,1,1,0.)},\n", " xaxis='top', xrotation=90,\n", " fontsize={'ticks': '7pt', 'title': '18pt'}, invert_xaxis=True, tools=['hover'],\n", @@ -93,7 +93,7 @@ "metadata": {}, "outputs": [], "source": [ - "hv.Layout([el.options(width=300, height=300) for el in styled if len(el)>10][:-1],\n", + "hv.Layout([el.opts(width=300, height=300) for el in styled if len(el)>10][:-1],\n", " label='LesMis Large Clusters').cols(3)" ] } diff --git a/examples/gallery/demos/bokeh/lorenz_attractor_example.ipynb b/examples/gallery/demos/bokeh/lorenz_attractor_example.ipynb index 3700d7aeef..9fb127000f 100644 --- a/examples/gallery/demos/bokeh/lorenz_attractor_example.ipynb +++ b/examples/gallery/demos/bokeh/lorenz_attractor_example.ipynb @@ -76,7 +76,7 @@ "metadata": {}, "outputs": [], "source": [ - "lorenzian.options(opts.Path(color=hv.Palette('Blues')))" + "lorenzian.opts(opts.Path(color=hv.Palette('Blues'), width=600, height=600))" ] } ], diff --git a/examples/gallery/demos/bokeh/mandelbrot_section.ipynb b/examples/gallery/demos/bokeh/mandelbrot_section.ipynb index 0ca4c1cb60..ae2c38c69a 100644 --- a/examples/gallery/demos/bokeh/mandelbrot_section.ipynb +++ b/examples/gallery/demos/bokeh/mandelbrot_section.ipynb @@ -68,7 +68,9 @@ " for y in np.linspace(-0.3, 0.3, 11)} # Half the frames of the bokeh version\n", "\n", "composition = hv.HoloMap(layouts, kdims='Y').collate().cols(2)\n", - "composition.options(opts.Contours(show_legend=False), opts.Points(scaling_factor=50))" + "composition.opts(\n", + " opts.Contours(show_legend=False), \n", + " opts.Points(scaling_factor=50))" ] } ], diff --git a/examples/gallery/demos/bokeh/measles_example.ipynb b/examples/gallery/demos/bokeh/measles_example.ipynb index b0a9fb0a1a..3b2e6dce95 100644 --- a/examples/gallery/demos/bokeh/measles_example.ipynb +++ b/examples/gallery/demos/bokeh/measles_example.ipynb @@ -66,7 +66,7 @@ "outputs": [], "source": [ "overlay = (heatmap + agg * vline * marker).cols(1)\n", - "overlay.options(\n", + "overlay.opts(\n", " opts.HeatMap(width=900, height=500, tools=['hover'], logz=True, \n", " invert_yaxis=True, labelled=[], toolbar='above', xaxis=None),\n", " opts.VLine(line_color='black'),\n", diff --git a/examples/gallery/demos/bokeh/network_graph.ipynb b/examples/gallery/demos/bokeh/network_graph.ipynb index bd36a6a559..1f0a7d4130 100644 --- a/examples/gallery/demos/bokeh/network_graph.ipynb +++ b/examples/gallery/demos/bokeh/network_graph.ipynb @@ -59,7 +59,7 @@ "fb_graph = fb_graph.redim.range(x=(-0.05, 1.05), \n", " y=(-0.05, 1.05)\n", " )\n", - "fb_graph.options(color_index='circle', width=800, height=800, show_frame=False,\n", + "fb_graph.opts(color_index='circle', width=800, height=800, show_frame=False,\n", " xaxis=None, yaxis=None,node_size=10, edge_line_width=1, cmap=colors)" ] } diff --git a/examples/gallery/demos/bokeh/nyc_airport_connections.ipynb b/examples/gallery/demos/bokeh/nyc_airport_connections.ipynb index 8ec4b17372..55dc492f7d 100644 --- a/examples/gallery/demos/bokeh/nyc_airport_connections.ipynb +++ b/examples/gallery/demos/bokeh/nyc_airport_connections.ipynb @@ -52,8 +52,8 @@ "np.random.seed(14)\n", "graph = layout_nodes(nyc_graph, layout=nx.layout.fruchterman_reingold_layout, kwargs={'weight': 'connections'})\n", "labels = hv.Labels(graph.nodes, ['x', 'y'], ['IATA', 'City'])\n", - "nyc_labels = labels.select(City='New York').options(text_color='white', yoffset=0.05, text_font_size='16pt')\n", - "other_labels = labels[labels['City']!='New York'].options(text_color='white', text_font_size='8pt')" + "nyc_labels = labels.select(City='New York').opts(text_color='white', yoffset=0.05, text_font_size='16pt')\n", + "other_labels = labels[labels['City']!='New York'].opts(text_color='white', text_font_size='8pt')" ] }, { @@ -71,7 +71,7 @@ "source": [ "plot = (graph * nyc_labels * other_labels).relabel('NYC Airport Connections')\n", "\n", - "plot.options(\n", + "plot.opts(\n", " opts.Graph(bgcolor='gray', edge_color=dim('SourceID').categorize({3697: 'red', 3797: 'blue'}, 'gray'), \n", " node_color=dim('index').categorize({3697: 'red', 3797: 'blue'}, 'gray'), width=800, height=800, \n", " xaxis=None, yaxis=None, xlim=(-1.2, 1.2), ylim=(-1.2, 1.2))\n", diff --git a/examples/gallery/demos/bokeh/nyc_radial_heatmap.ipynb b/examples/gallery/demos/bokeh/nyc_radial_heatmap.ipynb index 4b93beeacd..7bf4d1d485 100644 --- a/examples/gallery/demos/bokeh/nyc_radial_heatmap.ipynb +++ b/examples/gallery/demos/bokeh/nyc_radial_heatmap.ipynb @@ -85,7 +85,7 @@ "outputs": [], "source": [ "xticks = (\"Friday\", \"Saturday\", \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\")\n", - "heatmap.options(\n", + "heatmap.opts(\n", " opts.HeatMap(radial=True, start_angle=np.pi*19/14, width=600, height=600, \n", " yticks=None, xticks=xticks, xmarks=7, ymarks=3))" ] diff --git a/examples/gallery/demos/bokeh/point_draw_triangulate.ipynb b/examples/gallery/demos/bokeh/point_draw_triangulate.ipynb index 50242ade65..81e50c7f04 100644 --- a/examples/gallery/demos/bokeh/point_draw_triangulate.ipynb +++ b/examples/gallery/demos/bokeh/point_draw_triangulate.ipynb @@ -43,7 +43,7 @@ "metadata": {}, "outputs": [], "source": [ - "(trimesh * points).options(\n", + "(trimesh * points).opts(\n", " opts.Points(width=500, height=500, size=10, line_color='black', nonselection_alpha=0.3))" ] }, diff --git a/examples/gallery/demos/bokeh/quiver_demo.ipynb b/examples/gallery/demos/bokeh/quiver_demo.ipynb index 98a45ef4e1..0e61231fdb 100644 --- a/examples/gallery/demos/bokeh/quiver_demo.ipynb +++ b/examples/gallery/demos/bokeh/quiver_demo.ipynb @@ -59,7 +59,7 @@ "angle = (np.pi/2.) - np.arctan2(U/mag, V/mag)\n", "vectorfield = hv.VectorField((X.flat, Y.flat, angle.flat, mag.flat)\n", " ).relabel('Arrows scale with plot width, not view')\n", - "vectorfield.options(width=500)" + "vectorfield.opts(width=500)" ] }, { @@ -70,7 +70,7 @@ "source": [ "composition = (hv.VectorField((xs[::3], ys[::3], angle[::3, ::3], mag[::3, ::3])).options(width=500)\n", " * hv.Scatter((X[::3, ::3].flat, Y[::3, ::3].flat))).relabel(group=\"pivot='mid'; every third arrow\")\n", - "composition.options(opts.Scatter(color='red'))" + "composition.opts(opts.Scatter(color='red'))" ] }, { @@ -81,7 +81,7 @@ "source": [ "points = hv.Points((X.flat, Y.flat)) \n", "vectorfield = hv.VectorField((xs, ys, angle, mag), label=\"pivot='tip'; scales with x view\") \n", - "(points * vectorfield).options(\n", + "(points * vectorfield).opts(\n", " hv.opts.VectorField(width=500, magnitude='Magnitude', color='Magnitude', pivot='tip', line_width=2))" ] } diff --git a/examples/gallery/demos/bokeh/route_chord.ipynb b/examples/gallery/demos/bokeh/route_chord.ipynb index 4062822f9c..d9814875a0 100644 --- a/examples/gallery/demos/bokeh/route_chord.ipynb +++ b/examples/gallery/demos/bokeh/route_chord.ipynb @@ -58,7 +58,7 @@ "metadata": {}, "outputs": [], "source": [ - "busiest_airports.options(\n", + "busiest_airports.opts(\n", " opts.Chord(cmap='Category20', edge_color=dim('SourceID').str(), \n", " height=800, labels='City', node_color=dim('AirportID').str(), width=800))" ] diff --git a/examples/gallery/demos/bokeh/scatter_economic.ipynb b/examples/gallery/demos/bokeh/scatter_economic.ipynb index 77bf922c9b..80d5b7cfa7 100644 --- a/examples/gallery/demos/bokeh/scatter_economic.ipynb +++ b/examples/gallery/demos/bokeh/scatter_economic.ipynb @@ -56,7 +56,7 @@ "source": [ "gdp_unem_scatter = macro.to.scatter('Year', ['GDP Growth', 'Unemployment'])\n", "overlay = gdp_unem_scatter.overlay('Country')\n", - "overlay.options(\n", + "overlay.opts(\n", " opts.Scatter(width=700, height=400, scaling_method='width', scaling_factor=2, \n", " size_index=2, show_grid=True, color=hv.Cycle('Category20'), line_color='k'),\n", " opts.NdOverlay(legend_position='left', show_frame=False)\n", diff --git a/examples/gallery/demos/bokeh/square_limit.ipynb b/examples/gallery/demos/bokeh/square_limit.ipynb index 2221665c80..4cb1797c7c 100644 --- a/examples/gallery/demos/bokeh/square_limit.ipynb +++ b/examples/gallery/demos/bokeh/square_limit.ipynb @@ -130,7 +130,7 @@ "smallfish = flip(rot45(fish))\n", "t = fish * smallfish * rot(rot(rot(smallfish)))\n", "u = smallfish * rot(smallfish) * rot(rot(smallfish)) * rot(rot(rot(smallfish)))\n", - "squarelimit(3,u,t).options(\n", + "squarelimit(3,u,t).opts(\n", " opts.Spline(width=600, height=600, xaxis=None, yaxis=None))" ] } diff --git a/examples/gallery/demos/bokeh/step_chart.ipynb b/examples/gallery/demos/bokeh/step_chart.ipynb index 76b1eddaa4..d901f7f34d 100644 --- a/examples/gallery/demos/bokeh/step_chart.ipynb +++ b/examples/gallery/demos/bokeh/step_chart.ipynb @@ -60,7 +60,7 @@ "metadata": {}, "outputs": [], "source": [ - "postage.options(\n", + "postage.opts(\n", " opts.Curve(interpolation='steps-mid', width=400, height=400, \n", " line_dash=hv.Cycle(values=['dashed', 'solid'])),\n", " opts.Overlay(legend_position='top_left'))" diff --git a/examples/gallery/demos/bokeh/stocks_example.ipynb b/examples/gallery/demos/bokeh/stocks_example.ipynb index 8c48d05a64..7c945e24c6 100644 --- a/examples/gallery/demos/bokeh/stocks_example.ipynb +++ b/examples/gallery/demos/bokeh/stocks_example.ipynb @@ -72,7 +72,7 @@ "metadata": {}, "outputs": [], "source": [ - "((aapl * goog * ibm * msft) + (avg_scatter * avg_curve)).options(\n", + "((aapl * goog * ibm * msft) + (avg_scatter * avg_curve)).opts(\n", " opts.Curve(color=color_cycle),\n", " opts.Curve('Curve.Average', color='navy'),\n", " opts.Scatter(alpha=0.2, size=4, color='darkgrey'),\n", diff --git a/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb b/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb index f7b0a1b76a..04c6180bd9 100644 --- a/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb +++ b/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb @@ -58,7 +58,7 @@ "metadata": {}, "outputs": [], "source": [ - "choropleth.options(\n", + "choropleth.opts(\n", " opts.Polygons(logz=True, tools=['hover'], xaxis=None, yaxis=None,\n", " show_grid=False, show_frame=False, width=500, height=500,\n", " color_index='Unemployment', colorbar=True, toolbar='above', line_color='white'))" diff --git a/examples/gallery/demos/bokeh/timeseries_range_tool.ipynb b/examples/gallery/demos/bokeh/timeseries_range_tool.ipynb index cdf49867fc..c9fb6ffc38 100644 --- a/examples/gallery/demos/bokeh/timeseries_range_tool.ipynb +++ b/examples/gallery/demos/bokeh/timeseries_range_tool.ipynb @@ -70,7 +70,7 @@ "RangeToolLink(src, tgt)\n", "\n", "layout = (tgt + src).cols(1)\n", - "layout.options(opts.Layout(shared_axes=False), clone=False)" + "layout.opts(opts.Layout(shared_axes=False))" ] } ], diff --git a/examples/gallery/demos/bokeh/topographic_hillshading.ipynb b/examples/gallery/demos/bokeh/topographic_hillshading.ipynb index 15b0589157..511b5c025e 100644 --- a/examples/gallery/demos/bokeh/topographic_hillshading.ipynb +++ b/examples/gallery/demos/bokeh/topographic_hillshading.ipynb @@ -76,7 +76,7 @@ "metadata": {}, "outputs": [], "source": [ - "grid.options(\n", + "grid.opts(\n", " opts.GridMatrix(xaxis='bottom', yaxis='left', shared_xaxis=False, shared_yaxis=False),\n", " opts.Image(cmap='gray'))" ] diff --git a/examples/gallery/demos/bokeh/us_unemployment.ipynb b/examples/gallery/demos/bokeh/us_unemployment.ipynb index 6ff5197737..1aad70fd2d 100644 --- a/examples/gallery/demos/bokeh/us_unemployment.ipynb +++ b/examples/gallery/demos/bokeh/us_unemployment.ipynb @@ -57,7 +57,7 @@ "outputs": [], "source": [ "colors = [\"#75968f\", \"#a5bab7\", \"#c9d9d3\", \"#e2e2e2\", \"#dfccce\", \"#ddb7b1\", \"#cc7878\", \"#933b41\", \"#550b1d\"]\n", - "heatmap.options(\n", + "heatmap.opts(\n", " opts.HeatMap(width=900, height=400, xrotation=45, xaxis='top', labelled=[], \n", " tools=['hover'], cmap=ListedColormap(colors)))" ] diff --git a/examples/gallery/demos/bokeh/verhulst_mandelbrot.ipynb b/examples/gallery/demos/bokeh/verhulst_mandelbrot.ipynb index e3ead7e928..5c2b4ecf76 100644 --- a/examples/gallery/demos/bokeh/verhulst_mandelbrot.ipynb +++ b/examples/gallery/demos/bokeh/verhulst_mandelbrot.ipynb @@ -105,8 +105,8 @@ "overlay = (hv.Image(mandelbrot(800,800, 45, 46).copy(), bounds=(-2, -1.4, 0.8, 1.4))\n", " * bifurcation_diagram * hv.HLine(0) * vlines)\n", "\n", - "hv.output(size=120)\n", - "overlay.options(\n", + "hv.output(size=150)\n", + "overlay.opts(\n", " opts.HLine(color='k', line_dash='dashed'),\n", " opts.Image(cmap='Reds', logz=True, xaxis=None, yaxis=None),\n", " opts.Points(size=0.5, color='g'),\n",