☰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

The ticks in ColorBar cannot be displayed

Community Support
liweitan
liweitan

I created a independent colorbar with EqHistColorMapper and any one type of Ticker, but no any ticks on it, and, if I used the LinearColorMapper and FixedTicker or SingleIntervalTicker, this problem did not arise, could anybody tell me how to solve this problem?

example codes:

from bokeh.plotting import show, row
from bokeh.plotting import figure
from bokeh.models import ColorBar, LinearColorMapper, EqHistColorMapper,BinnedTicker
from colorcet import palette

color_mapper = EqHistColorMapper(palette=palette['fire'], low=1, high=2000)
ticker = BinnedTicker(mapper=color_mapper)
color_bar = ColorBar(color_mapper=color_mapper, location='center_left', orientation='vertical',
                                    height=250, width=20, major_tick_line_color='black', ticker=ticker )
f = figure(width=500, height=500, toolbar_location=None, x_axis_type=None, y_axis_type=None)
f.add_layout(color_bar, 'right')
show(f)
⌁   Link to post
Ian_Thomas
Ian_Thomas

Yes, an EqHistColorMapper needs to scan data to calculate the bins which determines the possible locations of ticks at bin edges. Conceptually it cannot have ticks at arbitrary locations as there is no sensible way to interpolate between bin edges. I suppose if you had a large dataset you could use a very large number of bins and choose which of the ticks to show, perhaps the nearest ticks to some desired tick locations. But this nearest tick functionality doesn’t exist in Bokeh.

⌁   Link to post

End of archived discussion · Replies are disabled