0

我正在使用 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 ......这些都不是函数!

感谢您的帮助

4

1 回答 1

0

由于 Bokeh 中的错误,上述代码无法正常工作。但是,该错误已被修复,并且该代码和与其类似的代码将按预期运行。

于 2018-08-20T21:25:38.340 回答