I’m looking to display some small numbers (on the order of 10^-6), and it seems natural to format the y-axis tick labels with abbreviated notations.
E.g., 5e-6 = 0.000005 should be displayed as 5u, or better:
However, I have not found a way to achieve this with
NumericalTickFormatter, where the option
a does not abbreviate below the decimal point. E.g.,
would give me 0.00.
Is there a way I can do this with Bokeh?
from bokeh.models.formatters import NumeralTickFormatter from bokeh.plotting import figure, output_file, show p = figure(plot_width=400, plot_height=400) p.circle([1,2,3,4,5], [x*10**(-6) for x in [2,5,8,2,7]], size=10) p.yaxis.formatter = NumeralTickFormatter(format="0.00a") show(p)