注释热图中的x轴标签位置,带有plotly python

时间:2017-09-13 14:38:22

标签: python plotly

在尝试使用python plotly绘制带注释的热图时,我得到了一个绘图问题:

我的代码就像:

fig = ff.create_annotated_heatmap(zlist, x=xlist, y=ylist, colorscale='Viridis')
fig['layout'].update(height=1500, width=1500, title='')
plt.plot(fig, filename='annotated_heatmap_text')

这里我的x轴标签在顶部。是否可以将其移至底部?非常感谢! (我试图附上一个情节,但由于我声誉不佳而失败了......)

1 个答案:

答案 0 :(得分:1)

不使用情节,但我很确定这已在这里得到解答:

How to make x axis label show up at the bottom not the top in Annotated Heatmap plotly python?

您正在寻找的这条线(据推测,尚未经过测试):

fig['layout']['xaxis']['side'] = 'bottom'