☰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

Labels on quads axis?

Community Support
Bryan
Bryan

This example may be helpful:

bokeh/custom_datetime_axis.py at main · bokeh/bokeh · GitHub

You would want to compute the “center” of each bin and configure the axis ticker with that list to set fixed tick locations. Then use major_label_overrides to explicitly provide your own labels for those fixed locations.

That said, there might be issues with floating point representation that cause issues for major_label_overrides to function (FP numbers as keys of a dict is always dicey). In that case a CustomJSTickFormatter is probably the only other option.

⌁   Link to post
Bryan
Bryan

All that said, I think personally a better solution is to pass the bin edge coordinates as the fixed tick locations, and not use any custom tick formatting at all (just regular axis numbers). That would show the same information (i.e labelling the bin extents). It’s very unusual to label individual bars of a histogram with “categorical”-like labels (and also just more work to accomplish)

⌁   Link to post

End of archived discussion · Replies are disabled