<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report figimage does not plot image expected when the output file is pdf. <!--A short 1-2 sentences that succinctly describes the bug--> **Code for reproduction** ```python import matplotlib.pylab as plt import numpy as np fig = plt.figure() img = np.random.rand(50,50) fig.figimage(img, 20, 20) plt.savefig('test.png') plt.savefig('test.pdf') ``` **Matplotlib version** <!--Please specify your platform and versions of the relevant libraries you are using:--> * Operating System: Ubuntu 16.04 * Matplotlib Version: 2.0.2 * Python Version: 3.6.1