def test_imshow_creates_modest_image(self): """returns a modestImage""" data = default_data() fig = plt.figure() ax = fig.add_subplot(111) artist = imshow(ax, data) self.assertIsInstance(artist, ModestImage) self.assertIn(artist, artist.axes.images)
def test_imshow_mimics_mpl(self): """properties of two axes and artists objects should be same""" data = default_data() fig = plt.figure() ax1 = fig.add_subplot(121) ax2 = fig.add_subplot(122) artist1 = ax1.imshow(data) artist2 = imshow(ax2, data) self.check_artist_props(artist1, artist2) self.check_axes_props(ax1, ax2)