Hi,
I’m trying to add a dynamic text label on the x-axis of my plot, but the text simply won’t appear.
It was working on bokeh 3.6 but stopped working on 3.7
from bokeh.plotting import figure, show
from bokeh.io import output_file
from bokeh.models import HTMLLabel
import os
output_file(os.path.join(os.getcwd(), "my_plot.html"))
p = figure(width=400, height=400)
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 15], legend_label="Temp", line_width=2)
x_label = HTMLLabel(x=0,
y=400,
text="Sample Label",
text_color="white",
level='overlay',
x_units='canvas',
y_units='canvas')
p.add_layout(x_label)
show(p)
I tried label, HTMLLabel but all getting clipped and not appearing as soon as outside canvas.
Is there a model that appears on x-axis or any other solution?
vincent