我正在尝试创建两个折线图,我想在每个折线图的底部添加一个箭头。当我分别绘制每个图形时,会出现箭头,但是当我使用column命令组合两个图时,底部图上的箭头无法正确显示(https://imgur.com/gallery/hUVMWzi)
我尝试翻转绘图的顺序,并且总是在顶部绘图将显示箭头而底部却不显示箭头的情况下。作为参考,我正在运行的测试用例中的cds1 = 526335和cds2 = 526664。
if (antisense == True):
cds1 = data.position[0]+data.distToCDSstart[0]
cds2 = data.position[0]+data.distToCDSstop[0]
elif (antisense == False):
cds1 = data.position[0]-data.distToCDSstart[0]
cds2 = data.position[0]-data.distToCDSstop[0]
indep_c = figure()
indep_c.add_layout(Arrow(end=VeeHead(size=5), line_color="black", x_start=cds1, y_start=-0.05, x_end=cds2, y_end=-0.05, line_alpha = 0.4, line_width = 4))
c0 = indep_c.line(data['position'], data['all'], color = '#4dac26', legend = 'pcf11_DRS', alpha = 1)
c1 = indep_c.line(data2['position'], data2['all'], color = '#b8e186', legend = 'Decay1', alpha = 1)
c2 = indep_c.line(data3['position'], data3['all'], color = '#f1b6da', legend = 'Decay2', alpha = 1)
c3 = indep_c.line(data4['position'], data4['all'], color = '#d01c8b', legend = 'Steinmetz', alpha = 1)
c4 = indep_c.line(df_comp['aligned_pos'], df_comp['cumulative'], color = '#000000', legend = '?', alpha = 1)
indep_c.below[0].formatter.use_scientific = False
indep_c.legend.location = "top_left"
indep_c.legend.click_policy="hide"
indep_p = figure()
indep_p.add_layout(Arrow(end=VeeHead(size=5), line_color="black", x_start=cds1, y_start=-0.05, x_end=cds2, y_end=-0.05, line_alpha = 0.4, line_width = 4))
p0 = indep_p.line(data['position'], data['p_indep'], color = '#4dac26', legend = 'pcf11_DRS', alpha = 1)
p1 = indep_p.line(data2['position'], data2['p_indep'], color = '#b8e186', legend = 'Decay1', alpha = 1)
p2 = indep_p.line(data3['position'], data3['p_indep'], color = '#f1b6da', legend = 'Decay2', alpha = 1)
p3 = indep_p.line(data4['position'], data4['p_indep'], color = '#d01c8b', legend = 'Steinmetz', alpha = 1)
p4 = indep_p.line(df_comp['aligned_pos'], df_comp['pASiteT'], color = '#000000', legend = '?', alpha = 1)
indep_p.below[0].formatter.use_scientific = False
indep_p.legend.location = "top_left"
indep_p.legend.click_policy="hide"
col1 = column(children=[indep_c, indep_p], sizing_mode='stretch_both')