Skip to content

Commit

Permalink
Updates to tutorial notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 17, 2017
1 parent b1b231d commit 14c6b13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/Tutorials/Bokeh_Elements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
},
"outputs": [],
"source": [
"%%opts Points [color_index=2 size_index=3 scaling_factor=50] (cmap='jet')\n",
"%%opts Points [color_index=2 size_index=3 scaling_factor=50]\n",
"np.random.seed(10)\n",
"data = np.random.rand(100,4)\n",
"\n",
Expand Down
19 changes: 4 additions & 15 deletions doc/Tutorials/Columnar_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,7 @@
},
"outputs": [],
"source": [
"%opts HeatMap [show_values=False xticks=40 xrotation=90 aspect=1.2 invert_yaxis=True colorbar=True]\n",
"%opts Layout [figure_size=120 aspect_weight=0.5 hspace=0.8 vspace=0]"
"%opts HeatMap [show_values=False xticks=40 xrotation=90 aspect=1.2 invert_yaxis=True colorbar=True]"
]
},
{
Expand All @@ -832,6 +831,7 @@
},
"outputs": [],
"source": [
"%%opts Layout [aspect_weight=1 fig_size=150 sublabel_position=(-0.2, 1.)]\n",
"hv.Layout([macro.to.heatmap(['Year', 'Country'], value)\n",
" for value in macro.data.columns[2:]]).cols(2)"
]
Expand Down Expand Up @@ -916,17 +916,6 @@
"While looking at the plots individually like this allows us to study trends for each country, we may want to lay out a subset of the countries side by side, e.g. for non-interactive publications. We can easily achieve this by selecting the countries we want to view and and then applying the ``.layout`` method. We'll also want to restore the square aspect ratio so the plots compose nicely."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%opts Overlay [aspect=1]"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -935,7 +924,7 @@
},
"outputs": [],
"source": [
"%%opts NdLayout [figure_size=100] Scatter [color_index=2] (cmap='Reds')\n",
"%%opts NdLayout [figure_size=100] Overlay [aspect=1] Scatter [color_index=2] (cmap='Reds')\n",
"countries = {'United States', 'Canada', 'United Kingdom'}\n",
"(gdp_curves * gdp_unem_scatter).select(Country=countries).layout('Country')"
]
Expand All @@ -955,7 +944,7 @@
},
"outputs": [],
"source": [
"%%opts Layout [fig_size=100] Scatter [color_index=2] (cmap='Reds')\n",
"%%opts Scatter [color_index=2] (cmap='Reds') Overlay [aspect=1]\n",
"(macro_overlay.relabel('GDP Growth', depth=1) +\\\n",
"macro.to.curve('Year', 'Unemployment', ['Country'], group='Unemployment',) +\\\n",
"macro.to.curve('Year', 'Trade', ['Country'], group='Trade') +\\\n",
Expand Down
4 changes: 2 additions & 2 deletions doc/Tutorials/Elements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,8 @@
},
"outputs": [],
"source": [
"%%opts VectorField.A [color_dim='angle'] VectorField.M [color_dim='magnitude']\n",
"hv.VectorField(vector_data, group='A')"
"%%opts VectorField.A [color_index=2] VectorField.M [color_index=3]\n",
"hv.VectorField(vector_data, group='A') + hv.VectorField(vector_data, group='M')"
]
},
{
Expand Down

0 comments on commit 14c6b13

Please sign in to comment.