Skip to content

Commit

Permalink
Updated and fixed issues in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 14, 2019
1 parent badcfff commit da27f2e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion examples/gallery/bokeh/xarray_image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"outputs": [],
"source": [
"ensemble = xr.open_dataset('../../data/ensemble.nc')\n",
"dataset = gv.Dataset(ensemble, ['longitude', 'latitude', 'time'], crs=crs.PlateCarree())\n",
"dataset = gv.Dataset(ensemble, ['longitude', 'latitude', 'time'], 'surface_temperature', crs=crs.PlateCarree())\n",
"images = dataset.to(gv.Image)\n",
"# Equivalent full definition:\n",
"# images = dataset.to(gv.Image, ['longitude', 'latitude'], 'surface_temperature', 'time')"
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/matplotlib/xarray_image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"outputs": [],
"source": [
"ensemble = xr.open_dataset('../../data/ensemble.nc')\n",
"dataset = gv.Dataset(ensemble, ['longitude', 'latitude', 'time'], crs=crs.PlateCarree())\n",
"dataset = gv.Dataset(ensemble, ['longitude', 'latitude', 'time'], 'surface_temperature', crs=crs.PlateCarree())\n",
"images = dataset.to(gv.Image)\n",
"# Equivalent full definition:\n",
"# images = dataset.to(gv.Image, ['longitude', 'latitude'], 'surface_temperature', 'time')"
Expand Down
19 changes: 0 additions & 19 deletions examples/user_guide/Gridded_Datasets_II.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,25 +285,6 @@
"curves.opts(width=600, height=400, legend_position='right', toolbar='above')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Aggregating coordinates\n",
"\n",
"Another option is to aggregate over certain dimensions, so that we can get an idea of distributions of temperatures across all latitudes and longitudes. Here we compute the mean temperature and standard deviation by latitude and longitude, casting the resulting collapsed view to a Spread Element:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"hv.Spread(dataset.aggregate('latitude', np.mean, np.std)) +\\\n",
"hv.Spread(dataset.aggregate('longitude', np.mean, np.std))"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit da27f2e

Please sign in to comment.