title: How to disable plotly express from grouping bars based on color?
body: <p>I have a pandas dataframe with 3 columns: name, group, value. I wanted to make a horizontal bar chart with plotly that is sorted from highest to lowest value and color each bar based on their value in the group column. The problem is that when I add the color argument, the bars get sorted by the colors as well. Is it possible to make the bars not get grouped together by color? </p>
  
  <p>Here is what I have tried. When I run the code without specifying the color attribute, the bars are sorted correctly. The code without color:</p>
  
  <pre class="lang-py prettyprint-override"><code>import plotly.express as px
  px.bar(df, x='value', y='name', orientation='h')
  fig.show()
  </code></pre>
  
  <p>The output is just as expected:</p>
  
  <p><a href="https://i.stack.imgur.com/FaGkd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FaGkd.png" alt="Bars are sorted in descending order"></a></p>
  
  <p>However, when I add the color attribute, the bars get sorted by the color:</p>
  
  <pre class="lang-py prettyprint-override"><code>fig = px.bar(data, x='value', y='name', orientation='h', color='group')
  fig.show()
  </code></pre>
  
  <p>The bars get a different sorting:
  <a href="https://i.stack.imgur.com/jFpkJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jFpkJ.png" alt="The bars are grouped by colors"></a></p>
  
  <p>Is there a way to prevent this behavior of grouping of bars? I am using plotly version 4.1.1 with python 3.7. I want the bars sorted like the first code block but colored by the group column. </p>