コード例 #1
0
 def test_layout_title_fontsize(self):
     hmap1 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     hmap2 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     layout = Layout([hmap1, hmap2]).opts(plot=dict(fontsize={'title': '12pt'}))
     plot = bokeh_renderer.get_plot(layout)
     title = plot.handles['title']
     self.assertIsInstance(title, Div)
     text = "<span style='font-size: 12pt'><b>Default: 0</b></font>"
     self.assertEqual(title.text, text)
コード例 #2
0
ファイル: testlayoutplot.py プロジェクト: swkeemink/holoviews
 def test_layout_title_fontsize(self):
     hmap1 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     hmap2 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     layout = Layout([hmap1, hmap2]).opts(plot=dict(fontsize={'title': '12pt'}))
     plot = bokeh_renderer.get_plot(layout)
     title = plot.handles['title']
     self.assertIsInstance(title, Div)
     text = ('<span style="color:black;font-family:Arial;font-style:bold;'
             'font-weight:bold;font-size:12pt">Default: 0</span>')
     self.assertEqual(title.text, text)
コード例 #3
0
 def test_layout_title_show_title_false(self):
     hmap1 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     hmap2 = HoloMap({a: Image(np.random.rand(10,10)) for a in range(3)})
     layout = Layout([hmap1, hmap2]).opts(plot=dict(show_title=False))
     plot = bokeh_renderer.get_plot(layout)
     self.assertTrue('title' not in plot.handles)