Use of Custom Labelling Policy Example

Trying to update my stuff to leverage all the great new features of 2.3.0 :slight_smile:

Looking for an example using the CustomLabellingPolicy to have superscripts/subscripts etc in axis and or tick labels… Thanks…

@gmerritt123 perhaps we did not communicate the intention well enough. A labeling policy is for deciding whether a label should be rendered at a tick location, not for formatting the label. E.g one of the new built in labeling policies will suppress tick labels in order to prevent any visual overlap. A custom labeling policy might filter labels on a nested categorical axis according to some need.

If you just want exponents in tick labels, that’s the new default behavior of log axes, nothing required to do. Otherwise please be more specific about what exactly you are trying to accomplish.

Thanks. I apologize, it’s way too easy for me to get axis labels and axis titles mixed up and that obviously matters with what I’m trying to ask about :smiley:

I want m^3/day to be the title of my y axis. Is that not part of the update? Apologies again if I’ve read into it wrong.

Fantastic re default in log tick labels, this makes this hydrogeologist (where everything is log scaled) very very happy.

That is not part of the last update, only log-axis tick labels are affected, because they can be handled automatically by a specific log tick label formatter without requiring any intervention or special syntax from the user. “Math” text in more general text contexts (i.e. with LaTeX syntax) is part of the ongoing funded work (just now getting started) that is part of the grant the project received from CZI: Bokeh Receives CZI Grant

EditL For a more recent, technical, and lively discussion see also: Latex axis and title labels · Issue #6031 · bokeh/bokeh · GitHub