Title for colorbar in Plotly Heatmap
Try
fig = go.Figure(
data=go.Heatmap(z=z_values, y=[str(x) for x in params_1], x=[str(x) for x in params_2]),
colorbar=dict(title='Title') ,
layout=go.Layout(
title="Analysis results",
xaxis=dict(title='Diameter'),
yaxis=dict(title='Max Distance')
),
)
fig.show()
Just include colorbar={"title": 'Your title'}
in go.Heatmap()
to get this:
Plot:
Code:
import plotly.graph_objects as go
fig = go.Figure(data=go.Heatmap(colorbar={"title": "Your title"},
z=[[1, 20, 30],
[20, 1, 60],
[30, 60, 1]]))
fig.show()