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}})
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)
def test_Asterisk(): marker = Asterisk() yield check_marker, marker yield check_fill, marker yield check_line, marker yield check_props, marker, MARKER, FILL, LINE
def setUp(self): from bokeh.glyphs import Asterisk self.test_asterisk = Asterisk()
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)