Hello,
I am trying to use a linear color mapper as fill color in a patches object. So far i have got to the conclusion that the values which the color is being mapped to is evaluated as NaN since the drawing turns all red using the minimal reproducible example below.
from bokeh.plotting import figure, show
from bokeh.transform import linear_cmap
from colorcet import coolwarm
x = [[1, 2, 3, 4]]
y = [[2, 3, 2, 4]]
p = figure(width=400, height=400)
color = linear_cmap('y', palette=coolwarm, low=1, high=3,nan_color='red')
source = {'x': x, 'y': y}
p.patches('x', 'y', source=source,fill_color = color)
show(p)
I guess this has something to do with the ‘y’ column in source containing list of lists? Am i doing something wrong or is there a workaround?