How to change position of colorbar?

How to change position of colorbar?

Hi @rohini31 ,

Try this example below, for changing position colorbar to left.

import plotly.graph_objects as go

import urllib
import json

# Load heatmap data
response = urllib.request.urlopen(
    "https://raw.githubusercontent.com/plotly/datasets/master/custom_heatmap_colorscale.json")
dataset = json.load(response)

# Create and show figure
fig = go.Figure(go.Heatmap(
    z=dataset["z"],
    colorbar=dict(
        x=0.2,
        xref="container",
        title="Surface Heat"
    )
))

fig.show()

or checkout from docs