How to change the position of the colorbar to the left side of the plot?

Sorry if this question is too basic but I am a newbie to Plotly and for a certain use case I wanted to set the position of the color bar to the left side of the plot how can I do this?
example:

1 Like

@atharvakatre

Set the new position as follows:

fig.update_layout(coloraxis_colorbar_x=-0.15)

You can change -0.15 and set a convenient position.

5 Likes

Thanks a lot :slightly_smiling_face: