i’d like to have labels with multiple lines. am trying to use FuncTickFormatter but neither an escaped carriage return (\n
) nor a line feed (\r
) nor both nor a javascript line break (<br>
) work. am debugging by modifying the +
in the example in the docs, which i cut & paste below. i tried escaping in various ways, but no joy. is there another way? thanks.
from bokeh.models import FuncTickFormatter
from bokeh.plotting import figure, output_file, show
output_file("formatter.html")
p = figure(plot_width=500, plot_height=500)
p.circle([0, 2, 4, 6, 8, 10], [6, 2, 4, 10, 8, 0], size=30)
p.yaxis.formatter = FuncTickFormatter(code="""
return Math.floor(tick) + " \n " + (tick % 1).toFixed(2)
""")
show(p)