From 17206296705045a966bd0d144426a48dd37f32d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 30 Nov 2013 19:39:39 +0100 Subject: [PATCH] Improve ssim example --- doc/examples/plot_ssim.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/examples/plot_ssim.py b/doc/examples/plot_ssim.py index 9fe0c930..4e657150 100644 --- a/doc/examples/plot_ssim.py +++ b/doc/examples/plot_ssim.py @@ -22,12 +22,16 @@ but with very different mean structural similarity indices. """ import numpy as np +import matplotlib import matplotlib.pyplot as plt from skimage import data, img_as_float from skimage.measure import structural_similarity as ssim +matplotlib.rcParams['font.size'] = 9 + + img = img_as_float(data.camera()) rows, cols = img.shape @@ -41,7 +45,7 @@ def mse(x, y): img_noise = img + noise img_const = img + abs(noise) -f, (ax0, ax1, ax2) = plt.subplots(1, 3) +f, (ax0, ax1, ax2) = plt.subplots(nrows=1, ncols=3, figsize=(8, 4)) mse_none = mse(img, img) ssim_none = ssim(img, img, dynamic_range=img.max() - img.min())