关于新版本的更新:在v4中,您可以指定共享的coloraxis,并在布局中更新指定coloraxis的属性,例如Python。 fig.add_trace(go.Heatmap(z = z, x = x, y = y, coloraxis = 'coloraxis1')) fig.update_layout(coloraxis1 = {'colorscale':'Electric'})