From ec65e1f541dce4aea43d4dc73729210b7a320d05 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 3 Feb 2012 16:10:08 -0800 Subject: [PATCH] DOC: Fix some typos in plot_equalize example. --- doc/examples/plot_equalize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/examples/plot_equalize.py b/doc/examples/plot_equalize.py index 2f0bb13e..111cf891 100644 --- a/doc/examples/plot_equalize.py +++ b/doc/examples/plot_equalize.py @@ -56,9 +56,9 @@ def plot_img_and_hist(img, axes, bins=256): img = data.moon() # Contrast stretching -p5 = np.percentile(img, 2) -p95 = np.percentile(img, 98) -img_rescale = exposure.rescale_intensity(img, in_range=(p5, p95)) +p2 = np.percentile(img, 2) +p98 = np.percentile(img, 98) +img_rescale = exposure.rescale_intensity(img, in_range=(p2, p98)) # Equalization img_eq = exposure.equalize(img) @@ -74,7 +74,7 @@ ax_hist.set_ylabel('Number of pixels') ax_img, ax_hist, ax_cdf = plot_img_and_hist(img_rescale, axes[:, 1]) ax_img.set_title('Contrast stretching') -ax_img, _, ax_cdf = plot_img_and_hist(img_eq, axes[:, 2]) +ax_img, ax_hist, ax_cdf = plot_img_and_hist(img_eq, axes[:, 2]) ax_img.set_title('Histogram equalization') ax_cdf.set_ylabel('Fraction of total intensity')