From 7e45baa3e2b372d5a81dce656781879c0408bcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 30 Nov 2013 19:06:20 +0100 Subject: [PATCH] Fix overlapping text --- doc/examples/plot_equalize.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/examples/plot_equalize.py b/doc/examples/plot_equalize.py index 52121e3a..220a126e 100644 --- a/doc/examples/plot_equalize.py +++ b/doc/examples/plot_equalize.py @@ -17,6 +17,8 @@ that fall within the 2nd and 98th percentiles [2]_. .. [2] http://homepages.inf.ed.ac.uk/rbf/HIPR2/stretch.htm """ + +import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -24,6 +26,9 @@ from skimage import data, img_as_float from skimage import exposure +matplotlib.rcParams['font.size'] = 8 + + def plot_img_and_hist(img, axes, bins=256): """Plot an image along with its histogram and cumulative histogram. @@ -66,7 +71,7 @@ img_eq = exposure.equalize_hist(img) img_adapteq = exposure.equalize_adapthist(img, clip_limit=0.03) # Display results -f, axes = plt.subplots(2, 4, figsize=(8, 4)) +f, axes = plt.subplots(nrows=2, ncols=4, figsize=(8, 5)) ax_img, ax_hist, ax_cdf = plot_img_and_hist(img, axes[:, 0]) ax_img.set_title('Low contrast image')