尝试使用 pythonplotly 绘制带注释的热图时遇到绘图问题:
我的代码是这样的:
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 轴标签。可以把它移到底部吗?多谢! (我尝试附加一个 plotly ,但由于我的声誉较低而失败......)
最佳答案
不使用plotly,但我很确定这已经在这里得到了回答:
How to make x axis label show up at the bottom not the top in Annotated Heatmap plotly python?
您正在寻找的行是这样的(大概尚未测试):
fig['layout']['xaxis']['side'] = 'bottom'
关于python - 使用plotly python注释热图中的x轴标签位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46200390/