☰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

Axis Label Multi-color

Community Support
Gen
Gen

I was looking thru the documentation: Styling Axes

Based on what I know about bokeh, I doubt this is possible, but I want to color the Labels of a Categorical x-axis different colors. Something like the below:

# Set the major labels of the X-axis to a list or colormap
p.xaxis.major_label_text_color = ['red', 'green','blue']

Is there a way to do this?

⌁   Link to post
Bryan
Bryan

Not presently, tick styling properties currently apply to all ticks on an axis. It seems there was a related discussion raised about this in the past but it never saw any movement

⌁   Link to post
Gen
Gen

Got it, thank you. It was a hopeful shot in the dark…given the number of times it’s been raised it is very unimportant.

In case anyone stumbles upon this thread later and is wondering, I did find a workaround.
Remove the x-axis entirely (xaxis.visible=False) and make a replacement axis/labels using a LabelSet (or text glyphs), a Line glyph for the axis itself, etc. Clunky, but does the trick.

⌁   Link to post

End of archived discussion · Replies are disabled