コード例 #1
0
ファイル: testrenderclass.py プロジェクト: chrinide/holoviews
    def setUp(self):
        if 'matplotlib' not in Store.renderers:
            raise SkipTest("Matplotlib required to test widgets")

        self.basename = 'no-file'
        self.image1 = Image(np.array([[0,1],[2,3]]), label='Image1')
        self.image2 = Image(np.array([[1,0],[4,-2]]), label='Image2')
        self.map1 = HoloMap({1:self.image1, 2:self.image2}, label='TestMap')

        self.unicode_table = ItemTable([('β','Δ1'), ('°C', '3×4')],
                                       label='Poincaré', group='α Festkörperphysik')

        self.renderer = MPLRenderer.instance()
コード例 #2
0
ファイル: test_renderer.py プロジェクト: ldsalomone/holoviews
    def setUp(self):
        if 'matplotlib' not in Store.renderers and pn is not None:
            raise SkipTest("Matplotlib and Panel required to test rendering.")

        self.basename = 'no-file'
        self.image1 = Image(np.array([[0,1],[2,3]]), label='Image1')
        self.image2 = Image(np.array([[1,0],[4,-2]]), label='Image2')
        self.map1 = HoloMap({1:self.image1, 2:self.image2}, label='TestMap')

        self.unicode_table = ItemTable([('β','Δ1'), ('°C', '3×4')],
                                       label='Poincaré', group='α Festkörperphysik')

        self.renderer = MPLRenderer.instance()
        self.nbcontext = Renderer.notebook_context
        self.comm_manager = Renderer.comm_manager
        with param.logging_level('ERROR'):
            Renderer.notebook_context = False
            Renderer.comm_manager = CommManager
コード例 #3
0
 def test_chart_reduce(self):
     mean = self.chart.reduce(x=np.mean)
     itable = ItemTable(OrderedDict([('y', np.mean(self.ys))]))
     self.assertEqual(mean, itable)