How to change dots color in scatter plot (express)?

is there any way to change default scatter colors in this code?

import as px
iris =
fig = px.scatter_matrix(iris,
    dimensions=["sepal_width", "sepal_length", "petal_width", "petal_length"],

I’d like to change default color blue and red to green and orange; orange for species X, green for species Y
If you could help.

1 Like

Anyone? Please…

Late here but came across this looking for same thing, so likely others too. I found the Express thing (and “color” param only accepting dataset grouping without override for single immediate fixed color) a bit odd at first - Plotly express bar colour change points out you need to know the wider first… (so why not just drop Express is the first thought!). But I bore with it and now worked out on Express we just need:

color_discrete_sequence=['green', 'orange']

which you can use for both single color change or sequenced as per OP. Traces and markers are used on

It’s worth not swerving the doc on package — 5.1.0 documentation

Hope this helps someone else - am loving Plotly’s hover-overs which massively beats base charting packages!