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."""