Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在Bokeh上创建动态标签集以避免文本重叠?_Python_Label_Bokeh - Fatal编程技术网

Python 如何在Bokeh上创建动态标签集以避免文本重叠?

Python 如何在Bokeh上创建动态标签集以避免文本重叠?,python,label,bokeh,Python,Label,Bokeh,我想在Bokeh上创建一个标签集,它将定义最佳位置,以避免文本重叠 我尝试了以下代码但未成功: labels = LabelSet(x='weight', y='height', text='Name', level='glyph', x_offset=5, y_offset=5, source=source, render_mode='canvas') 从Bokeh 1.1开始,Bokeh没有内置任何自动回避标签的功能。我认为这将是一个伟大的功能,但还没有人有机会

我想在Bokeh上创建一个标签集,它将定义最佳位置,以避免文本重叠

我尝试了以下代码但未成功:

labels = LabelSet(x='weight', y='height', text='Name', level='glyph',
              x_offset=5, y_offset=5, source=source, render_mode='canvas')

从Bokeh 1.1开始,Bokeh没有内置任何自动回避标签的功能。我认为这将是一个伟大的功能,但还没有人有机会在它的工作。目前还没有一个很好的答案,除了手动实验和标签放置之外,没有什么建议。(如果情节允许缩放,即使这样也可以取消。)

感谢您的反馈!我将等待更新;)AFAIK没有问题,因此如果您对它成为一个功能感兴趣,请打开GitHub讨论它,详细介绍建议/首选的语法、行为等。