Failed to use matplotlib colormap in bokeh image

I failed to use matplotlib colormap in bokeh image

When I try:

from matplotlib import cm
cmap = cm.get_cmap('hot', 256)

p.image(image='image', x=minX_dep, y=minY_dep, 
        dw=(maxX_dep-minX_dep ), dh=( maxY_dep-minY_dep) ,     
        global_alpha=0.5 , source=source, 
        color_mapper=cmap)   #  cmap doesn't fit here

how can I use matplotlib’s cmap in bokeh’s image?
OR
Is there any other solution to use colorpalette(hot) ?

regards

Bokeh should’ve given you a clear error message of what you’ve done wrong.
Either use the palette argument or pass an instance of ColorMapper to color_mapper.

Bokeh palettes are lists of RGB hex strings, e.g. "#ffb3e2", you will need to convert whatever format the MPL palette is in to that. You may also find there is an existing built-in palette that suits your needs:

Lastly, to help others help you, please always format code snippets, either using the GUI </> button or by enclosing in triple backticks ``` (I’ve edited your post).