String formatting in Bokeh axis

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

Hi,

···

On Mon, Jan 19, 2015 at 11:57 PM, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.