bokeh.transform.log_cmap

Here are the examples of the python api bokeh.transform.log_cmap taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

3 Source : test_transform.py
with MIT License
from rthorst

    def test_basic(self):
        t = bt.log_cmap("foo", ["red", "green"], 0, 10, low_color="orange", high_color="blue", nan_color="pink")
        assert isinstance(t, dict)
        assert set(t) == {"field", "transform"}
        assert t['field'] == "foo"
        assert isinstance(t['transform'], LogColorMapper)
        assert t['transform'].palette == ["red", "green"]
        assert t['transform'].low == 0
        assert t['transform'].high == 10
        assert t['transform'].low_color == "orange"
        assert t['transform'].high_color == "blue"
        assert t['transform'].nan_color == "pink"

    def test_defaults(self):

3 Source : test_transform.py
with MIT License
from rthorst

    def test_defaults(self):
        t = bt.log_cmap("foo", ["red", "green"], 0, 10)
        assert isinstance(t, dict)
        assert set(t) == {"field", "transform"}
        assert t['field'] == "foo"
        assert isinstance(t['transform'], LogColorMapper)
        assert t['transform'].palette == ["red", "green"]
        assert t['transform'].low == 0
        assert t['transform'].high == 10
        assert t['transform'].low_color is None
        assert t['transform'].high_color is None
        assert t['transform'].nan_color == "gray"

class Test_stack(object):