我怎么能让bokeh在图瓦周围画一个彩色的边框呢?一些图形块必须针对其他图形进行图形突出显示,因此客户希望在一些图块周围有一个彩色边框/有色框架。不幸的是,我在关于Holoviz bokeh的文档中没有找到任何关于它的东西。
这有可能吗?
提前谢谢。诚挚的问候
发布于 2022-07-22 21:08:17
您可以在标题周围添加边框,方法是手动更新Title注释,或者创建新注释并将其添加到Figure中。
from bokeh.io import show
from bokeh.models.annotations import Title
from bokeh.plotting import figure
from bokeh.layouts import row
# Use your own Title annotation
p1 = figure(height=250, width=400)
p1.line([0, 1, 2, 3], [0, 2, 1, 3])
p1.title = Title(
text='hello world!', text_font_size='16pt',
border_line_color='red', border_line_width=3
)
# OR configure the existing one:
p2 = figure(height=250, width=400)
p2.line([0, 1, 2, 3], [0, 2, 1, 3])
p2.title.text = 'hello world again!'
p2.title.border_line_color = 'green'
p2.title.border_line_width = 3
p2.title.text_font_size = '16pt'
show(row([p1, p2]))

https://stackoverflow.com/questions/73005457
复制相似问题