Esempio n. 1
0
    def test_cell_opts_util_norm(self):
        mat1 = hv.Image(np.random.rand(5, 5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image {+axiswise}", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
            Store.lookup_options('matplotlib', mat1,
                                 'norm').options.get('axiswise', True), True)
Esempio n. 2
0
    def test_cell_opts_util_style(self):
        mat1 = hv.Image(np.random.rand(5, 5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image (cmap='hot')", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
            Store.lookup_options('matplotlib', mat1,
                                 'style').options.get('cmap', None), 'hot')
Esempio n. 3
0
    def test_cell_opts_util_style(self):
        mat1 = hv.Image(np.random.rand(5,5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image (cmap='hot')", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
             Store.lookup_options('matplotlib',
                                  mat1, 'style').options.get('cmap',None),'hot')
Esempio n. 4
0
    def test_cell_opts_util_norm(self):
        mat1 = hv.Image(np.random.rand(5,5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image {+axiswise}", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
            Store.lookup_options('matplotlib',
                                 mat1, 'norm').options.get('axiswise',True), True)
Esempio n. 5
0
    def test_cell_opts_util_plot(self):

        mat1 = hv.Image(np.random.rand(5,5), name='mat1')

        self.assertEqual(mat1.id, None)
        opts("Image [show_title=False]", mat1)
        self.assertNotEqual(mat1.id, None)
        self.assertEqual(
            Store.lookup_options('matplotlib',
                                 mat1, 'plot').options.get('show_title',True),False)
Esempio n. 6
0
    def test_cell_opts_util_plot(self):

        mat1 = hv.Image(np.random.rand(5,5), name='mat1')

        self.assertEqual(mat1.id, None)
        opts("Image [show_title=False]", mat1)
        self.assertNotEqual(mat1.id, None)
        self.assertEqual(
            Store.lookup_options('matplotlib',
                                 mat1, 'plot').options.get('show_title',True),False)
Esempio n. 7
0
    def test_cell_opts_util_style(self):
        mat1 = hv.Image(np.random.rand(5, 5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image (cmap='hot')", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
            Store.lookup_options('matplotlib', mat1,
                                 'style').options.get('cmap', None), 'hot')
        self.log_handler.assertContains(
            'WARNING',
            'Double positional argument signature of opts is deprecated')
Esempio n. 8
0
    def test_cell_opts_util_norm(self):
        mat1 = hv.Image(np.random.rand(5, 5), name='mat1')
        self.assertEqual(mat1.id, None)
        opts("Image {+axiswise}", mat1)
        self.assertNotEqual(mat1.id, None)

        self.assertEqual(
            Store.lookup_options('matplotlib', mat1,
                                 'norm').options.get('axiswise', True), True)
        self.log_handler.assertContains(
            'WARNING',
            'Double positional argument signature of opts is deprecated')
Esempio n. 9
0
    def test_cell_opts_util_plot(self):

        mat1 = hv.Image(np.random.rand(5, 5), name='mat1')

        self.assertEqual(mat1.id, None)
        opts("Image [show_title=False]", mat1)
        self.assertNotEqual(mat1.id, None)
        self.assertEqual(
            Store.lookup_options('matplotlib', mat1,
                                 'plot').options.get('show_title', True),
            False)
        self.log_handler.assertContains(
            'WARNING',
            'Double positional argument signature of opts is deprecated')