from bokeh.plotting import figure
from bokeh.io import output_notebook, show
import numpy as np
output_notebook()
xs = [1.,2,3,4,5]
ys = [1.,2,3,4,5]
colors = ['blue'] * len(xs)
colors[1] = 'red'
p1 =figure(height=300, width=300)
r = p1.rect(xs, ys, color=colors, width=.25, height=.25)
show(p1)
r.data_source.data
{'fill_color': ['blue', 'red', 'blue', 'blue', 'blue'], 'line_color': ['blue', 'red', 'blue', 'blue', 'blue'], 'x': [1.0, 2, 3, 4, 5], 'y': [1.0, 2, 3, 4, 5]}
r.data_source.data['fill_color'][2] = 'green'
show(p1)