diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index f2d9984a3429..e46b949425bb 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -620,7 +620,7 @@ def _check_unsampled_image(self, renderer): if renderer.option_scale_image(): return True else: - warnings.warn("The backend (%s) does not support interpolation='none'. The image will be interpolated with 'nearest` mode." % (str(type(renderer)))) + warnings.warn("The backend (%s) does not support interpolation='none'. The image will be interpolated with 'nearest` mode." % renderer.__class__) return False