Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 24, 2024
1 parent 8635d6d commit 4d01c8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions book/geospatial/rasterio.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@
"metadata": {},
"outputs": [],
"source": [
"red_band = src.read(1)\n",
"elev_band = src.read(1)\n",
"plt.figure(figsize=(8, 8))\n",
"plt.imshow(red_band, cmap=\"terrain\")\n",
"plt.imshow(elev_band, cmap=\"terrain\")\n",
"plt.colorbar(label=\"Elevation (meters)\", shrink=0.5)\n",
"plt.title(\"DEM with Terrain Colormap\")\n",
"plt.show()"
Expand Down Expand Up @@ -1349,7 +1349,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions book/geospatial/rasterio.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ When visualizing raster data, colormaps help map pixel values to colors, while c
Let's read the first band and plot it with a colormap:

```{code-cell} ipython3
red_band = src.read(1)
elev_band = src.read(1)
plt.figure(figsize=(8, 8))
plt.imshow(red_band, cmap="terrain")
plt.imshow(elev_band, cmap="terrain")
plt.colorbar(label="Elevation (meters)", shrink=0.5)
plt.title("DEM with Terrain Colormap")
plt.show()
Expand Down

0 comments on commit 4d01c8f

Please sign in to comment.