作者:过期物品请勿购_613 | 来源:互联网 | 2023-09-23 18:42
在图中,显示了我当前的网站。顶部是散景生成的图形。在其下面是一个滑块。在图中,这是红线,它是散景范围。使用上述滑块,我可以在图中移动跨度。滑块下方是左侧的图片,右侧是输入字段,它们是通过以下代码实现的:
#Generates a widget that holds the picture of the mill
mill_image = Div( text="""
alt="div_image"
>""",0",title=_("classifier speed"),散景:在图片中找到一个小部件" alt="散景:在图片中找到一个小部件" src="https://img.php1.cn/3cd4a/9b0d/ae9/2d998ad7838fbf16.jpeg" >
现在我的问题是:我想做的是将输入字段放在图片中的某处。我正在考虑使用坐标设置其位置。目前,我正在使用以下代码来表示立场。
output = column(
p,#Graph
time_slider,#Slider
row(
mill_image,#Picture
text_clas_speed,#Input field that displays the value
widgetbox(checkbox_group),#Some checkboxes not visable in the screenshot
)
)
结果是,此结构中可能没有text_clas_speed,它带有mill_image。目前,我不知道如何完成这项工作。非常感谢您的帮助。
Bokeh的内置布局系统没有重叠元素的概念或功能,因此不可能将图像的控制权与纯Bokeh重叠。您将需要创建一个Jinja HTML模板,以某种方式以重叠的方式放置div,然后使用Bokeh的embed API将单个组件放置在模板中。