title: Plotly: How to manually set the color of points in plotly express scatter plots?
body: <p><a href="https://plotly.com/python/line-and-scatter/" rel="noreferrer">https://plotly.com/python/line-and-scatter/</a> has many scatter plot examples, but not a single one showing you how to set all the points' colours within px.scatter:</p>
  <pre><code># x and y given as DataFrame columns
  import plotly.express as px
  df = px.data.iris() # iris is a pandas DataFrame
  fig = px.scatter(df, x=&quot;sepal_width&quot;, y=&quot;sepal_length&quot;)
  fig.show()
  </code></pre>
  <p>I've tried adding <code>colour = 'red'</code> etc doesn't work. These examples only show you how to colour by some other variable.</p>
  <p>In principle I could add another feature and set it all the same but that seems a bizzare way of accomplishing the task....</p>