From 31b37a7adf7585b7884faf7b83f3fc404d8efdc0 Mon Sep 17 00:00:00 2001 From: gantian127 Date: Thu, 25 Jul 2024 17:01:58 -0600 Subject: [PATCH] update plot code to set vmin value --- notebooks/soilgrids.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/soilgrids.ipynb b/notebooks/soilgrids.ipynb index dcfa01c..b45f881 100755 --- a/notebooks/soilgrids.ipynb +++ b/notebooks/soilgrids.ipynb @@ -149,7 +149,7 @@ "outputs": [], "source": [ "# plot data\n", - "data.plot(figsize=(9, 5))\n", + "data.plot(figsize=(9, 5),vmin=0)\n", "plt.title(\"Mean pH between 0 and 5 cm soil depth in Senegal\")" ] }, @@ -279,7 +279,7 @@ "\n", "# plot data\n", "fig, ax = plt.subplots(1, 1, figsize=(9, 5))\n", - "im = ax.imshow(data_2D, extent=extent)\n", + "im = ax.imshow(data_2D, extent=extent,vmin=0)\n", "fig.colorbar(im)\n", "plt.xlabel(\"X\")\n", "plt.ylabel(\"Y\")\n", @@ -529,7 +529,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.12.4" } }, "nbformat": 4,