From 28f7c9be886fd59610176e8642cccc2414520af8 Mon Sep 17 00:00:00 2001 From: RRosio Date: Wed, 27 Mar 2024 17:07:39 -0700 Subject: [PATCH] update image processing example notebok imports and function call --- docs/source/examples/Image Processing.ipynb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/source/examples/Image Processing.ipynb b/docs/source/examples/Image Processing.ipynb index addd12ec1d..d4eb140b6d 100644 --- a/docs/source/examples/Image Processing.ipynb +++ b/docs/source/examples/Image Processing.ipynb @@ -18,7 +18,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "tags": ["remove-cell"] + "tags": [ + "remove-cell" + ] }, "outputs": [], "source": [ @@ -39,6 +41,7 @@ "from IPython.display import Image\n", "from ipywidgets import interact, interactive, fixed\n", "import matplotlib as mpl\n", + "import matplotlib.pyplot as plt\n", "from skimage import data, filters, io, img_as_float\n", "import numpy as np" ] @@ -84,7 +87,7 @@ " # Don't let matplotlib autoscale the color range so we can control overall luminosity\n", " vmax = 255 if arr.dtype == 'uint8' else 1.0\n", " with BytesIO() as buffer:\n", - " mpl.image.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n", + " plt.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n", " out = buffer.getvalue()\n", " return Image(out)" ] @@ -230,9 +233,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.5" + "version": "3.11.4" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }