From c6dff6942d88f54182797f10862d5e2568f11399 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Thu, 15 Jan 2015 22:26:55 +1100 Subject: [PATCH] Don't create new plot automatically This behavior is a bit too magical and may interfere with creation of interactive ImageCollection browsers, for example. --- skimage/io/_plugins/matplotlib_plugin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/skimage/io/_plugins/matplotlib_plugin.py b/skimage/io/_plugins/matplotlib_plugin.py index 3038c59b..fb43fbf8 100644 --- a/skimage/io/_plugins/matplotlib_plugin.py +++ b/skimage/io/_plugins/matplotlib_plugin.py @@ -136,8 +136,6 @@ def imshow(im, *args, **kwargs): ax_im : `matplotlib.pyplot.AxesImage` The `AxesImage` object returned by `plt.imshow`. """ - if plt.gca().has_data(): - plt.figure() lo, hi, cmap = _get_display_range(im) kwargs.setdefault('interpolation', 'nearest') kwargs.setdefault('cmap', cmap)