☰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

String formatting in Bokeh axis

Community Support
Marc_Garcia
Marc_Garcia

Hi there,

Is it possible to change the format of an axis to for example add a string? I have a numerical axis representing dollars, and I’d like to add the dollar symbol before the label in each tick.

In matplotlib it’s possible to do with:

ax.yaxis.set_major_formatter(plt.FormatStrFormatter("$%i"))

But I don’t see a way to do this in Bokeh.

Thank you!

Marc

⌁   Link to post
Mateusz_Paprocki
Mateusz_Paprocki

Hi,

···

On Mon, Jan 19, 2015 at 11:57 PM, garcia.marc@gmail.com wrote:

Hi there,

Is it possible to change the format of an axis to for example add a string? I have a numerical axis representing dollars, and I’d like to add the dollar symbol before the label in each tick.

In matplotlib it’s possible to do with:

ax.yaxis.set_major_formatter(plt.FormatStrFormatter(“$%i”))

But I don’t see a way to do this in Bokeh.

Currently it’s not possible, but will be implemented for bokeh 0.8 (scheduled for middle of February). You can track progress in https://github.com/bokeh/bokeh/issues/842.

Mateusz

Thank you!

Marc

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/d13cff7c-b803-49d9-96e6-f326797aa9b4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled