From 5280cacb829273790e6199624aefda91be2849b6 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 29 Sep 2014 23:10:35 +0200 Subject: [PATCH] Avoid matplotlib testing problems on Travis-CI --- skimage/draw/draw.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skimage/draw/draw.py b/skimage/draw/draw.py index cd0b1d9b..03b554c7 100644 --- a/skimage/draw/draw.py +++ b/skimage/draw/draw.py @@ -6,6 +6,11 @@ from ._draw import _coords_inside_image from .._shared._geometry import polygon_clip from ._draw import line +from skimage._shared.version_requirements import is_installed +matplotlib_installed = is_installed('matplotlib') +if not matplotlib_installed: + warn('Polygon perimeter drawing requires matplotlib') + def _ellipse_in_shape(shape, center, radiuses): """Generate coordinates of points within ellipse bounded by shape."""