Пример #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)
Пример #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')
Пример #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')
Пример #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)
Пример #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)
Пример #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)
Пример #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')
Пример #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')
Пример #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')