diff --git a/book/geospatial/rasterio.ipynb b/book/geospatial/rasterio.ipynb index e43b990..f816c43 100644 --- a/book/geospatial/rasterio.ipynb +++ b/book/geospatial/rasterio.ipynb @@ -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()" @@ -1349,7 +1349,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.11.8" } }, "nbformat": 4, diff --git a/book/geospatial/rasterio.md b/book/geospatial/rasterio.md index a424f08..9529188 100644 --- a/book/geospatial/rasterio.md +++ b/book/geospatial/rasterio.md @@ -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()