コード例 #1
0
 def test_plot_options_keywords(self):
     im = Image(np.random.rand(10, 10))
     styled_im = im.options(interpolation='nearest', cmap='jet')
     self.assertEqual(self.lookup_options(im, 'plot').options, {})
     self.assertEqual(
         self.lookup_options(styled_im, 'style').options,
         dict(cmap='jet', interpolation='nearest'))
コード例 #2
0
ファイル: testoptions.py プロジェクト: basnijholt/holoviews
 def test_plot_options_one_object(self):
     im = Image(np.random.rand(10,10))
     imopts = opts.Image(interpolation='nearest', cmap='jet')
     styled_im = im.options(imopts)
     self.assertEqual(self.lookup_options(im, 'plot').options, {})
     self.assertEqual(self.lookup_options(styled_im, 'style').options,
                      dict(cmap='jet', interpolation='nearest'))
コード例 #3
0
ファイル: testoptions.py プロジェクト: JulianDekker/DOVAL
 def test_plot_options_object_list(self):
     im = Image(np.random.rand(10,10))
     imopts1 = opts.Image(interpolation='nearest')
     imopts2 = opts.Image(cmap='summer')
     styled_im = im.options([imopts1,imopts2])
     self.assertEqual(self.lookup_options(im, 'plot').options, {})
     self.assertEqual(self.lookup_options(styled_im, 'style').options,
                      dict(cmap='summer', interpolation='nearest'))
コード例 #4
0
ファイル: testoptions.py プロジェクト: basnijholt/holoviews
 def test_plot_options_object_list(self):
     im = Image(np.random.rand(10,10))
     imopts1 = opts.Image(interpolation='nearest')
     imopts2 = opts.Image(cmap='summer')
     styled_im = im.options([imopts1,imopts2])
     self.assertEqual(self.lookup_options(im, 'plot').options, {})
     self.assertEqual(self.lookup_options(styled_im, 'style').options,
                      dict(cmap='summer', interpolation='nearest'))