I have a plotly express figure:
fig = px.line(data, x="DateTime", y="Gold", title="Gold Prices")
I want to change some details, like so
fig.update_layout(
line_color="#0000ff", # ValueError: Invalid property specified for object of type plotly.graph_objs.Layout: 'line'
line=dict(
color='rgb(204, 204, 204)',
width=5
), # Bad property path: line
)
But both attempts (trying solutions I researched on here) failed, with the errors given in the comments.
I have also tried fig = px.line(data, x="DateTime", y="Gold", title="Gold Prices", template="ggplot2", color_discrete_map={"Gold": "green"})
to no avail.
How do I make this work please?