title: plotly graph object colors to similar
body: <p>I try to plot values using plotly graph objects, and use one column to set the color.</p>
  <pre><code>fig_1.add_trace(
      go.Scattermapbox(
              lat=data.latitude, 
              lon=data.longitude,
              marker=go.scattermapbox.Marker(size=9, color=data.id_nr),   
              )
          )
  </code></pre>
  <p>However, the values are very high numbers (id numbers, int64) and thereby, id numbers which are closer to each other (100k different rather than 1M) will appear almost as the same color.</p>
  <p><strong>Is there a way to set the colours as discrete colours?</strong> using</p>
  <pre><code>... color=data.id_nr.astype(str) 
  </code></pre>
  <p>as used in Plotly express to make the coolers discrete does not work.</p>
  <blockquote>
  <p>Invalid element(s) received for the 'color' property of
  scattermapbox.marker</p>
  </blockquote>
  <p>The basic question is: <strong>Can you set the colors that each value, however how close or distanced the delta is, gets a unique color?</strong></p>
  <hr />
  <p><strong>EDIT:</strong>
  The id values are more like:</p>
  <pre><code>id=[1,2,5,100004,100007,100009]
  </code></pre>
  <p>In combination with continuous coloring by plotly, the first three and the last three are kind of identically in color.
  Plotly express solves this with changing the int values (of id) to strings, making them discrete.</p>
  <hr />
  <p><strong>EDIT2 :</strong></p>
  <p>A solution would be to separate the data by ID Then add a trace for each ID. However, this is not ...&quot;sexy&quot; and I would rather know a solution with plotly handling the colors discretely.</p>