散景:使用矩形字形,宽度和x共享

问题描述

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

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

解决方法

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

G.H。