コード例 #1
0
ファイル: test_imshow.py プロジェクト: mantidproject/mantid
    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)
コード例 #2
0
ファイル: test_imshow.py プロジェクト: yutiansut/mantid
    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)
コード例 #3
0
ファイル: test_imshow.py プロジェクト: mantidproject/mantid
    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)
コード例 #4
0
ファイル: test_imshow.py プロジェクト: yutiansut/mantid
    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)