Greek symbols in UI titles


I am trying to create a slider that has \mu_1 as a title. I tried using title=r'\mu_1', which just gave me the literal string not the actual greek symbol. I also tried using MathML, which appears to be working in graphs but throws an error when I try to use it in the title of a slider.

from bokeh.models import Slider, MathML

mu_1 = """

my_slider = Slider(title=MathML(text=mu_1),

This gives me the following error message

ValueError: failed to validate Slider(id='1113', ...).title: expected either None or a value of type String, got MathML(id='1112', ...)

Is there an easier way to do this? Do sliders and other UI elements support MathML?

2.4 added math text support only to axes and Div. Support for other places e.g titles, labels, sliders, and legends is coming in Bokeh 3.0 in the next few months.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.