我正在使用 Bokeh,我想在图像的特定位置添加一个圆圈。目前,我创建这样的图像:
img = image(image=[data],
x_range=[0, x_range],
y_range=[0, y_range],
x=x,
y=y,
dw=dw,
dh=dh,
tools=TOOLS,
palette=["Greys-9"],
title=title,
plot_width=plot_width,
plot_height=plot_height,
)
circle(x=10,y=10,radius=100,fill_color="#df1c1c",line_color="#df1c1c")
resources = Resources("inline")
plot_script, plot_div = components(img, resources)
html_script = encode_utf8(plot_script)
html_div = encode_utf8(plot_div)
hold()
figure()
return html_script, html_div
并将其发送到我的 HTML 页面。
问题是圆圈不在最终显示上。也许在背景上?我不知道...
我尝试了 add 函数、add_glyph 函数、add_layout ......这些都不是函数!
感谢您的帮助