<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong><br>
From matplorlib 2.0 to 2.1 this problem appeared: Floating point image RGB values must be in the 0..1 range, instead of producing an image with noise on it.</p>
<p dir="auto"><strong>Code for reproduction</strong><br>
Can use any image to try to reproduce this problem:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import imageio
import numpy as np
from matplotlib.pyplot import imshow
%matplotlib inline

image_file=&quot;image.jpg&quot;
content_image = imageio.imread(image_file)
#imshow(content_image)

noise_ratio = 0.6
image_height, image_width, color_channels = content_image.shape
noise_image = np.random.uniform(-20, 20, (1, image_height, image_width, color_channels)).astype('float32')
input_image = noise_image * noise_ratio + content_image * (1 - noise_ratio)
imshow(input_image[0])"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">imageio</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">import</span> <span class="pl-s1">imshow</span>
<span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span>

<span class="pl-s1">image_file</span><span class="pl-c1">=</span><span class="pl-s">"image.jpg"</span>
<span class="pl-s1">content_image</span> <span class="pl-c1">=</span> <span class="pl-s1">imageio</span>.<span class="pl-en">imread</span>(<span class="pl-s1">image_file</span>)
<span class="pl-c">#imshow(content_image)</span>

<span class="pl-s1">noise_ratio</span> <span class="pl-c1">=</span> <span class="pl-c1">0.6</span>
<span class="pl-s1">image_height</span>, <span class="pl-s1">image_width</span>, <span class="pl-s1">color_channels</span> <span class="pl-c1">=</span> <span class="pl-s1">content_image</span>.<span class="pl-s1">shape</span>
<span class="pl-s1">noise_image</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">uniform</span>(<span class="pl-c1">-</span><span class="pl-c1">20</span>, <span class="pl-c1">20</span>, (<span class="pl-c1">1</span>, <span class="pl-s1">image_height</span>, <span class="pl-s1">image_width</span>, <span class="pl-s1">color_channels</span>)).<span class="pl-en">astype</span>(<span class="pl-s">'float32'</span>)
<span class="pl-s1">input_image</span> <span class="pl-c1">=</span> <span class="pl-s1">noise_image</span> <span class="pl-c1">*</span> <span class="pl-s1">noise_ratio</span> <span class="pl-c1">+</span> <span class="pl-s1">content_image</span> <span class="pl-c1">*</span> (<span class="pl-c1">1</span> <span class="pl-c1">-</span> <span class="pl-s1">noise_ratio</span>)
<span class="pl-en">imshow</span>(<span class="pl-s1">input_image</span>[<span class="pl-c1">0</span>])</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;matplotlib.image.AxesImage at 0x7fad8700b748&gt;
Error in callback &lt;function install_repl_displayhook.&lt;locals&gt;.post_execute at 0x7fad44bbb510&gt; (for post_execute):
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~/.local/lib/python3.5/site-packages/matplotlib/pyplot.py in post_execute()
    147             def post_execute():
    148                 if matplotlib.is_interactive():
--&gt; 149                     draw_all()
    150 
    151             # IPython &gt;= 2

~/.local/lib/python3.5/site-packages/matplotlib/_pylab_helpers.py in draw_all(cls, force)
    134         for f_mgr in cls.get_all_fig_managers():
    135             if force or f_mgr.canvas.figure.stale:
--&gt; 136                 f_mgr.canvas.draw_idle()
    137 
    138 atexit.register(Gcf.destroy_all)

~/.local/lib/python3.5/site-packages/matplotlib/backend_bases.py in draw_idle(self, *args, **kwargs)
   2053         if not self._is_idle_drawing:
   2054             with self._idle_draw_cntx():
-&gt; 2055                 self.draw(*args, **kwargs)
   2056 
   2057     def draw_cursor(self, event):

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in draw(self)
    429             # if toolbar:
    430             #     toolbar.set_cursor(cursors.WAIT)
--&gt; 431             self.figure.draw(self.renderer)
    432         finally:
    433             # if toolbar:

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-&gt; 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2579             renderer.stop_rasterizing()
   2580 
-&gt; 2581         mimage._draw_list_compositing_images(renderer, self, artists)
   2582 
   2583         renderer.close_group('axes')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/image.py in draw(self, renderer, *args, **kwargs)
    566         else:
    567             im, l, b, trans = self.make_image(
--&gt; 568                 renderer, renderer.get_image_magnification())
    569             if im is not None:
    570                 renderer.draw_image(gc, l, b, im)

~/.local/lib/python3.5/site-packages/matplotlib/image.py in make_image(self, renderer, magnification, unsampled)
    793         return self._make_image(
    794             self._A, bbox, transformed_bbox, self.axes.bbox, magnification,
--&gt; 795             unsampled=unsampled)
    796 
    797     def _check_unsampled_image(self, renderer):

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification, unsampled, round_to_pixel_border)
    484             # (of int or float)
    485             # or an RGBA array of re-sampled input
--&gt; 486             output = self.to_rgba(output, bytes=True, norm=False)
    487             # output is now a correctly sized RGBA array of uint8
    488 

~/.local/lib/python3.5/site-packages/matplotlib/cm.py in to_rgba(self, x, alpha, bytes, norm)
    254                 if xx.dtype.kind == 'f':
    255                     if norm and xx.max() &gt; 1 or xx.min() &lt; 0:
--&gt; 256                         raise ValueError(&quot;Floating point image RGB values &quot;
    257                                          &quot;must be in the 0..1 range.&quot;)
    258                     if bytes:

ValueError: Floating point image RGB values must be in the 0..1 range.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.5/dist-packages/IPython/core/formatters.py in __call__(self, obj)
    339                 pass
    340             else:
--&gt; 341                 return printer(obj)
    342             # Finally look for special method names
    343             method = get_real_method(obj, self.print_method)

/usr/local/lib/python3.5/dist-packages/IPython/core/pylabtools.py in &lt;lambda&gt;(fig)
    236 
    237     if 'png' in formats:
--&gt; 238         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    239     if 'retina' in formats or 'png2x' in formats:
    240         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

/usr/local/lib/python3.5/dist-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    120 
    121     bytes_io = BytesIO()
--&gt; 122     fig.canvas.print_figure(bytes_io, **kw)
    123     data = bytes_io.getvalue()
    124     if fmt == 'svg':

~/.local/lib/python3.5/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-&gt; 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs)
    506 
    507     def print_png(self, filename_or_obj, *args, **kwargs):
--&gt; 508         FigureCanvasAgg.draw(self)
    509         renderer = self.get_renderer()
    510         original_dpi = renderer.dpi

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in draw(self)
    429             # if toolbar:
    430             #     toolbar.set_cursor(cursors.WAIT)
--&gt; 431             self.figure.draw(self.renderer)
    432         finally:
    433             # if toolbar:

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-&gt; 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2579             renderer.stop_rasterizing()
   2580 
-&gt; 2581         mimage._draw_list_compositing_images(renderer, self, artists)
   2582 
   2583         renderer.close_group('axes')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/image.py in draw(self, renderer, *args, **kwargs)
    566         else:
    567             im, l, b, trans = self.make_image(
--&gt; 568                 renderer, renderer.get_image_magnification())
    569             if im is not None:
    570                 renderer.draw_image(gc, l, b, im)

~/.local/lib/python3.5/site-packages/matplotlib/image.py in make_image(self, renderer, magnification, unsampled)
    793         return self._make_image(
    794             self._A, bbox, transformed_bbox, self.axes.bbox, magnification,
--&gt; 795             unsampled=unsampled)
    796 
    797     def _check_unsampled_image(self, renderer):

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification, unsampled, round_to_pixel_border)
    484             # (of int or float)
    485             # or an RGBA array of re-sampled input
--&gt; 486             output = self.to_rgba(output, bytes=True, norm=False)
    487             # output is now a correctly sized RGBA array of uint8
    488 

~/.local/lib/python3.5/site-packages/matplotlib/cm.py in to_rgba(self, x, alpha, bytes, norm)
    254                 if xx.dtype.kind == 'f':
    255                     if norm and xx.max() &gt; 1 or xx.min() &lt; 0:
--&gt; 256                         raise ValueError(&quot;Floating point image RGB values &quot;
    257                                          &quot;must be in the 0..1 range.&quot;)
    258                     if bytes:

ValueError: Floating point image RGB values must be in the 0..1 range.
&lt;Figure size 432x288 with 1 Axes&gt;"><pre class="notranslate"><code class="notranslate">&lt;matplotlib.image.AxesImage at 0x7fad8700b748&gt;
Error in callback &lt;function install_repl_displayhook.&lt;locals&gt;.post_execute at 0x7fad44bbb510&gt; (for post_execute):
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~/.local/lib/python3.5/site-packages/matplotlib/pyplot.py in post_execute()
    147             def post_execute():
    148                 if matplotlib.is_interactive():
--&gt; 149                     draw_all()
    150 
    151             # IPython &gt;= 2

~/.local/lib/python3.5/site-packages/matplotlib/_pylab_helpers.py in draw_all(cls, force)
    134         for f_mgr in cls.get_all_fig_managers():
    135             if force or f_mgr.canvas.figure.stale:
--&gt; 136                 f_mgr.canvas.draw_idle()
    137 
    138 atexit.register(Gcf.destroy_all)

~/.local/lib/python3.5/site-packages/matplotlib/backend_bases.py in draw_idle(self, *args, **kwargs)
   2053         if not self._is_idle_drawing:
   2054             with self._idle_draw_cntx():
-&gt; 2055                 self.draw(*args, **kwargs)
   2056 
   2057     def draw_cursor(self, event):

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in draw(self)
    429             # if toolbar:
    430             #     toolbar.set_cursor(cursors.WAIT)
--&gt; 431             self.figure.draw(self.renderer)
    432         finally:
    433             # if toolbar:

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-&gt; 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2579             renderer.stop_rasterizing()
   2580 
-&gt; 2581         mimage._draw_list_compositing_images(renderer, self, artists)
   2582 
   2583         renderer.close_group('axes')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/image.py in draw(self, renderer, *args, **kwargs)
    566         else:
    567             im, l, b, trans = self.make_image(
--&gt; 568                 renderer, renderer.get_image_magnification())
    569             if im is not None:
    570                 renderer.draw_image(gc, l, b, im)

~/.local/lib/python3.5/site-packages/matplotlib/image.py in make_image(self, renderer, magnification, unsampled)
    793         return self._make_image(
    794             self._A, bbox, transformed_bbox, self.axes.bbox, magnification,
--&gt; 795             unsampled=unsampled)
    796 
    797     def _check_unsampled_image(self, renderer):

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification, unsampled, round_to_pixel_border)
    484             # (of int or float)
    485             # or an RGBA array of re-sampled input
--&gt; 486             output = self.to_rgba(output, bytes=True, norm=False)
    487             # output is now a correctly sized RGBA array of uint8
    488 

~/.local/lib/python3.5/site-packages/matplotlib/cm.py in to_rgba(self, x, alpha, bytes, norm)
    254                 if xx.dtype.kind == 'f':
    255                     if norm and xx.max() &gt; 1 or xx.min() &lt; 0:
--&gt; 256                         raise ValueError("Floating point image RGB values "
    257                                          "must be in the 0..1 range.")
    258                     if bytes:

ValueError: Floating point image RGB values must be in the 0..1 range.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.5/dist-packages/IPython/core/formatters.py in __call__(self, obj)
    339                 pass
    340             else:
--&gt; 341                 return printer(obj)
    342             # Finally look for special method names
    343             method = get_real_method(obj, self.print_method)

/usr/local/lib/python3.5/dist-packages/IPython/core/pylabtools.py in &lt;lambda&gt;(fig)
    236 
    237     if 'png' in formats:
--&gt; 238         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    239     if 'retina' in formats or 'png2x' in formats:
    240         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

/usr/local/lib/python3.5/dist-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    120 
    121     bytes_io = BytesIO()
--&gt; 122     fig.canvas.print_figure(bytes_io, **kw)
    123     data = bytes_io.getvalue()
    124     if fmt == 'svg':

~/.local/lib/python3.5/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-&gt; 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs)
    506 
    507     def print_png(self, filename_or_obj, *args, **kwargs):
--&gt; 508         FigureCanvasAgg.draw(self)
    509         renderer = self.get_renderer()
    510         original_dpi = renderer.dpi

~/.local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py in draw(self)
    429             # if toolbar:
    430             #     toolbar.set_cursor(cursors.WAIT)
--&gt; 431             self.figure.draw(self.renderer)
    432         finally:
    433             # if toolbar:

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-&gt; 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2579             renderer.stop_rasterizing()
   2580 
-&gt; 2581         mimage._draw_list_compositing_images(renderer, self, artists)
   2582 
   2583         renderer.close_group('axes')

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    136     if not_composite or not has_images:
    137         for a in artists:
--&gt; 138             a.draw(renderer)
    139     else:
    140         # Composite any adjacent images together

~/.local/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---&gt; 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~/.local/lib/python3.5/site-packages/matplotlib/image.py in draw(self, renderer, *args, **kwargs)
    566         else:
    567             im, l, b, trans = self.make_image(
--&gt; 568                 renderer, renderer.get_image_magnification())
    569             if im is not None:
    570                 renderer.draw_image(gc, l, b, im)

~/.local/lib/python3.5/site-packages/matplotlib/image.py in make_image(self, renderer, magnification, unsampled)
    793         return self._make_image(
    794             self._A, bbox, transformed_bbox, self.axes.bbox, magnification,
--&gt; 795             unsampled=unsampled)
    796 
    797     def _check_unsampled_image(self, renderer):

~/.local/lib/python3.5/site-packages/matplotlib/image.py in _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification, unsampled, round_to_pixel_border)
    484             # (of int or float)
    485             # or an RGBA array of re-sampled input
--&gt; 486             output = self.to_rgba(output, bytes=True, norm=False)
    487             # output is now a correctly sized RGBA array of uint8
    488 

~/.local/lib/python3.5/site-packages/matplotlib/cm.py in to_rgba(self, x, alpha, bytes, norm)
    254                 if xx.dtype.kind == 'f':
    255                     if norm and xx.max() &gt; 1 or xx.min() &lt; 0:
--&gt; 256                         raise ValueError("Floating point image RGB values "
    257                                          "must be in the 0..1 range.")
    258                     if bytes:

ValueError: Floating point image RGB values must be in the 0..1 range.
&lt;Figure size 432x288 with 1 Axes&gt;
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">In matplotlib==2.0.2 and previous this code generates a image with some noise applied to it.</p>
<p dir="auto">In matplotlib=2.1.x the error above appear.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: ubuntu 16.04</li>
<li>Matplotlib version: 2.1.X</li>
<li>Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline</li>
<li>Python version: 3.5.2</li>
<li>Jupyter version (if applicable): Jupyterlab==0.30.6</li>
<li>Other libraries:
<blockquote>
<p dir="auto">numpy==1.14.0<br>
imageio==2.2.0</p>
</blockquote>
</li>
</ul>
<p dir="auto">The libraries are installed in pure python via pip install. I also build from the source to test if a recent unreleased version had this problem solved this but also got the same output.</p>
<p dir="auto">I am using IPython Notebook to view matplotlib graphs. I have noticed many times that the markers are drawn slightly off-center. Here is an example:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/738893/43926583-a25148f4-9bdf-11e8-96ce-0b57e0deb61f.png"><img src="https://user-images.githubusercontent.com/738893/43926583-a25148f4-9bdf-11e8-96ce-0b57e0deb61f.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Closeup:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/738893/43926636-cd55433e-9bdf-11e8-857d-fbb0b8300839.png"><img src="https://user-images.githubusercontent.com/738893/43926636-cd55433e-9bdf-11e8-857d-fbb0b8300839.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Code to reproduce:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

t = np.linspace(-1,1,40)
plt.plot(t,t**3 - 0.75*t,'.-',linewidth=0.3)
plt.grid(True)"><pre class="notranslate"><span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>

<span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-c1">1</span>,<span class="pl-c1">40</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">t</span>,<span class="pl-s1">t</span><span class="pl-c1">**</span><span class="pl-c1">3</span> <span class="pl-c1">-</span> <span class="pl-c1">0.75</span><span class="pl-c1">*</span><span class="pl-s1">t</span>,<span class="pl-s">'.-'</span>,<span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0.3</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">grid</span>(<span class="pl-c1">True</span>)</pre></div>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Windows 10</li>
<li>Matplotlib version: 2.2.2'</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</li>
<li>Python version: 2.7.15 from Anaconda Python</li>
<li>Jupyter version (if applicable): 5.5.0</li>
<li>Other libraries: n/a</li>
</ul>