How to change graph background color in plotly go.Scatter?

i’m looking for a way to change graph background color in plotly go.Scatter ?

thanks

import plotly.graph_objects as go
import numpy as np

N = 1000

t = np.linspace(0, 10, 100)

y = np.sin(t)

fig = go.Figure(data=go.Scatter(x=t, y=y, mode=β€˜markers’))

# Changing the background color

fig.update_layout(
plot_bgcolor=β€˜#899866’) # change here
)

fig.show()

2 Likes

thanks that works, btw do you know how to set different colors for plotted data ? in case of graph object scatter plot