【问题标题】:Bokeh : use of rectangles glyph, width and x sharing散景:使用矩形字形、宽度和 x 共享
【发布时间】:2020-09-09 13:56:00
【问题描述】:

我在 python 中使用 Bokeh (1.4.0) 进行交互式绘图。我使用矩形图作为异常警报数据反馈。不幸的是,矩形之间有巨大的白色间隙。 width 参数不会改变任何东西。这可能是由于上面第一张图的 x_sharing 参数所致。

plot_options = dict(plot_width=width, plot_height=300, x_axis_type="datetime",
                            x_range=p1.x_range)
p4 = figure(title="Analyse d'anomalie", tools="reset, pan, box_select, wheel_zoom", y_range=tuple(anomaly_names), **plot_options)
        for j,name in list(zip(range(len(anomaly_names)), anomaly_names)):
            p4.rect(x="estampilles", y=heatmap_y_coordinate[j], width=1000, height=1, line_color=None,
            line_alpha=0, fill_color=transform(name, mapper), dilate=True, source=source_dic)

这里的source_dic 是一本字典。

The third plot from the top shows narrow rectangles

有没有人知道如何解决这个问题?文档上没有关于此的任何内容。我渴望听到社区的声音。

谢谢。

你的,

G.H

【问题讨论】:

    标签: bokeh rectangles


    【解决方案1】:

    如果有人感兴趣,解决这个问题的方法是使用 datetime.timedelta(minutes=15) 例如自动调整矩形。

    G.H.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-10
      • 2021-08-27
      • 2016-09-29
      • 1970-01-01
      相关资源
      最近更新 更多