I’m working on an application that works with different SI units. For that application, I need to display units as bokeh labels in plots. However, I’m having issues with some of the symbols I need, and I’m not sure if the problem is in my usage of the library, or if it’s a bug with bokeh or MathJax.
In particular, I need a non-italic greek lowercase mu (μ) and a uppercase A with an overring (Å), but have been unable to get those. They are rendered almost correctly, but appear very small and on top of the other letters.
Here’s a minimal working example of everything I’ve tried so far:
from bokeh.plotting import figure, curdoc
from bokeh.models import Label
p = figure(
width=550,
height=250,
x_range=(-50, 500),
y_range=(-125, 125),
)
label = Label(
x=0,
y=0,
text=(
r"$$\upmu\mathrm{N}\mathrm{m}$$ "
r"$$\mbox{µ}\mathrm{N}\mathrm{m}$$ "
r"$$\text{µ}\mathrm{N}\mathrm{m}$$ "
r"$$\mbox{µ}^\circ\mathrm{C}\Omega\mbox{Å}\%'''^\circ{\hbar}E_\mathrm{h}$$ " # These are all the special characters I need. Most of them do work like this.
),
)
p.add_layout(label)
curdoc().add_root(p)
Here’s a screenshot of the resulting plot:
As you can see, the problematic letters are rendered almost correctly, they’re just very small and overlap the other letters.
Does anyone know why this happens or how I might fix it?




