Example #1
0
class TestAsterisk(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Asterisk
        self.test_asterisk = Asterisk()

    def test_expected_values(self):
        self.assertEqual(self.test_asterisk.__view_model__,'asterisk')

    def test_to_glyphspec(self):
        self.assertEqual(self.test_asterisk.to_glyphspec(), {'line_color': {'value': 'black'}, 'fill_color': {'value': 'gray'}, 'y': {'units': 'data', 'field': 'y'}, 'x': {'units': 'data', 'field': 'x'}, 'type': 'asterisk', 'size': {'units': 'screen', 'field': None, 'default': 4}})
Example #2
0
class TestAsterisk(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Asterisk
        self.test_asterisk = Asterisk()

    def test_expected_values(self):
        self.assertEqual(self.test_asterisk.__view_model__, 'asterisk')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'asterisk'
        self.assertEqual(self.test_asterisk.to_glyphspec(), expected)
Example #3
0
class TestAsterisk(unittest.TestCase):

    def setUp(self):
        from bokeh.glyphs import Asterisk
        self.test_asterisk = Asterisk()

    def test_expected_values(self):
        self.assertEqual(self.test_asterisk.__view_model__, 'asterisk')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'asterisk'
        self.assertEqual(self.test_asterisk.to_glyphspec(), expected)
Example #4
0
def test_Asterisk():
    marker = Asterisk()
    yield check_marker, marker
    yield check_fill, marker
    yield check_line, marker
    yield check_props, marker, MARKER, FILL, LINE
Example #5
0
 def setUp(self):
     from bokeh.glyphs import Asterisk
     self.test_asterisk = Asterisk()
Example #6
0
     InvertedTriangle(x="x",
                      y="y",
                      size="sizes",
                      line_color="#DE2D26",
                      line_width=2)),
    ("cross",
     Cross(x="x",
           y="y",
           size="sizes",
           line_color="#E6550D",
           fill_color=None,
           line_width=2)),
    ("asterisk",
     Asterisk(x="x",
              y="y",
              size="sizes",
              line_color="#F0027F",
              fill_color=None,
              line_width=2)),
]


def make_tab(title, glyph):
    plot = Plot(title=title, data_sources=[source], x_range=xdr, y_range=ydr)
    renderer = Glyph(data_source=source,
                     xdata_range=xdr,
                     ydata_range=ydr,
                     glyph=glyph)
    plot.renderers.append(renderer)
    xaxis = LinearAxis(plot=plot, dimension=0)
    yaxis = LinearAxis(plot=plot, dimension=1)
    xgrid = Grid(plot=plot, dimension=0, axis=xaxis)
Example #7
0
 def setUp(self):
     from bokeh.glyphs import Asterisk
     self.test_asterisk = Asterisk()