In [1]:
from bokeh.io import output_notebook, show
from bokeh.plotting import figure
from bokeh.properties import value
output_notebook()
f = figure(x_range=(0,3), y_range=(0,4))
f.circle([1], [1], radius=0.2, fill_color=["LemonChiffon"])  # Works
f.circle([2], [1], radius=0.2, fill_color=["lemonchiffon"])  # Works

f.circle([1], [2], radius=0.2, fill_color="LemonChiffon")  # Does not work
f.circle([2], [2], radius=0.2, fill_color="lemonchiffon")  # Works

f.circle([1], [3], radius=0.2, fill_color=value("LemonChiffon"))  # Does not work
f.circle([2], [3], radius=0.2, fill_color=value("lemonchiffon"))  # Does not work

show(f)


BokehJS successfully loaded.
ERROR:/opt/miniconda/envs/ipython_bokeh_34/lib/python3.4/site-packages/bokeh/validation/check.py:E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: LemonChiffon [renderer: GlyphRenderer, ViewModel:GlyphRenderer, ref _id: b89fbe44-53e4-44a6-8833-fae7f47734da]

In [2]:
from bokeh.io import output_notebook, show
output_notebook()


BokehJS successfully loaded.

In [33]:
from bokeh.plotting import figure
from bokeh.properties import value
from itertools import product
from math import pi

cats = ['None', 'Alpha', 'RGB', 'RGBA', 'Alpha+RGB', 'Alpha+RGBA']
p = figure(x_range=cats, y_range=cats,
           title="Fill and Line Color Property Combinations")

alpha = 0.5

fill_color = (242, 44, 64)
fill_hex_color = '#EB2E41'
fill_css_color = 'lemonchiffon'

fill_color_alpha = (242, 44, 64, alpha)
fill_hex_color_alpha = value('#EB2E41BB')

line_color = (0, 0, 0)
line_hex_color = value('#EB2E41')

line_color_alpha = (255, 0, 0, alpha)
line_hex_color_alpha = value('#EB2E41')

# define fill and line color combinations
fill = [(1, {}),
        (2, {'fill_alpha': alpha}),
        (3, {'fill_color': fill_css_color}),
        (4, {'fill_color': fill_color_alpha}),
        (5, {'fill_alpha': alpha, 'fill_color': fill_color}),
        (6, {'fill_alpha': alpha, 'fill_color': fill_color_alpha})]

line = [(1, {}),
        (2, {'line_alpha': alpha}),
        (3, {'line_color': line_color}),
        (4, {'line_color': line_color_alpha}),
        (5, {'line_alpha': alpha, 'line_color': line_color}),
        (6, {'line_alpha': alpha, 'line_color': line_color_alpha})]

# plot intersection of fill and line combinations
combinations = product(fill, line)
for comb in combinations:
    x, fill_options = comb[0]
    y, line_options = comb[1]

    options = fill_options.copy()
    options.update(line_options)

    p.circle(x, y, line_width=7, size=50, **options)

p.xaxis[0].axis_label = "Fill Options"
p.xaxis[0].major_label_orientation = pi/4
p.yaxis[0].axis_label = "Line Options"
show(p)



In [4]:
fill


Out[4]:
[(1, {}),
 (2, {'fill_alpha': 0.5}),
 (3, {'fill_color': (242, 44, 64)}),
 (4, {'fill_color': (242, 44, 64, 0.5)}),
 (5, {'fill_alpha': 0.5, 'fill_color': (242, 44, 64)}),
 (6, {'fill_alpha': 0.5, 'fill_color': (242, 44, 64, 0.5)})]

In [5]:
line


Out[5]:
[(1, {}),
 (2, {'line_alpha': 0.5}),
 (3, {'line_color': (0, 0, 0)}),
 (4, {'line_color': (0, 0, 0, 0.5)}),
 (5, {'line_alpha': 0.5, 'line_color': (0, 0, 0)}),
 (6, {'line_alpha': 0.5, 'line_color': (0, 0, 0, 0.5)})]

In [3]:
from bokeh.properties import value

f = figure(x_range=(0,3), y_range=(0,4))
f.circle([1], [1], radius=0.2, fill_color=["LemonChiffon"])  # Works
f.circle([2], [1], radius=0.2, fill_color=["lemonchiffon"])  # Works

f.circle([1], [2], radius=0.2, fill_color="LemonChiffon")  # Does not work
f.circle([2], [2], radius=0.2, fill_color="lemonchiffon")  # Works

f.circle([1], [3], radius=0.2, fill_color=value("LemonChiffon"))  # Does not work
f.circle([2], [3], radius=0.2, fill_color=value("lemonchiffon"))  # Does not work

show(f)


ERROR:/opt/miniconda/envs/ipython_bokeh_34/lib/python3.4/site-packages/bokeh/validation/check.py:E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: LemonChiffon [renderer: GlyphRenderer, ViewModel:GlyphRenderer, ref _id: 9fe950f1-655b-4f94-9b35-a9303568b2f9]

In [20]:




In [ ]: