☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Include LinearColorMapper object in ColumnDataSource

Community Support
ahmettemiz88
ahmettemiz88

Is there any way to include LinearColorMapper object in ColumnDataSource,
then manipulate image and its color ?

Here is the code I tried
source = ColumnDataSource(
data=dict(image = [data[::-1,:]] ))

cmapper = LinearColorMapper(my_color, low=0.005, high=0.86, nan_color=“rgba(255, 255, 255, 0.0)”,
low_color=‘rgba(255, 255, 255, 0.5)’ )

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=cmapper)

regards

⌁   Link to post
p-himik
p-himik

You cannot put LinearColorMapper directly into ColumnDataSource, no.
But you can:

  • Put manually computed color values into a data source
  • Modify the color mapper parameters directly
⌁   Link to post

End of archived discussion · Replies are disabled