我需要多个绘图的颜色条范围相同,但无法克服自动调整功能。
fig = go.Figure(data=[go.Surface(z=display_data.T)])
title_name = ('Sample title')
fig.update_layout(title=title_name, title_font_size=20, autosize=False,
width=1200, height=900,
margin=dict(l=50, r=50, b=50, t=50),
)
fig.update_layout(scene_camera_eye=dict(x=4, y=-0.01, z=17),
scene_aspectmode='manual',
scene_aspectratio=dict(x=9, y=12, z=10),
scene = dict(xaxis = dict(nticks=10, range=[0,342],),
yaxis = dict(nticks=10, range=[0,448],),
zaxis = dict(nticks=10, range=[0,5],),),)
fig.show()
有几件事对我的身材没有任何改变。
fig.update_layout(coloraxes = dict(
cauto=False,
cmin=-5,
cmax=5)
)
或
fig.update_layout(coloraxis = dict(colorscale='balance', colorbar_len=0.7),)
颜色条的范围应该是 [0 5] 但所有值都远小于 5,这就是为什么上限只有 3.5+ 帮助将不胜感激。 干杯