# Group bars and continuous colorscale

**URL:** <https://community.plotly.com/t/group-bars-and-continuous-colorscale/78773>\
**Category:** 📊 Plotly Python\
**Tags:** question\
**Created:** [September 25, 2023, 8:55am UTC](https://community.plotly.com/t/group-bars-and-continuous-colorscale/78773 "2023-09-25T08:55:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dataturnsmeon](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dataturnsmeon](https://community.plotly.com/u/dataturnsmeon)\
**Post date:** [September 25, 2023, 8:55am UTC](https://community.plotly.com/t/group-bars-and-continuous-colorscale/78773/1 "2023-09-25T08:55:46Z")

</div>

I have noticed a wierd behaviour when using `barmode=group` and passing a numerical data column to `color` attribute of the px.bar function

```auto
import plotly.express as px
df = px.data.tips()
fig = px.bar(df, x="sex", y="total_bill",
             color='total_bill', barmode='group',
             height=400)
fig.show()

```

**Why does it render a stacked bar chart?**

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/f/d/fdf3a5511ac0ac3f633ffee975e46c6f49795474.png)  
Does it not support having continuous colorscale for grouped bars?

---

<div class="post-metadata">

**Author:** ![jhupiterz](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jhupiterz/32/19435_2.png) [@jhupiterz](https://community.plotly.com/u/jhupiterz)\
**Post date:** [September 26, 2023, 5:46pm UTC](https://community.plotly.com/t/group-bars-and-continuous-colorscale/78773/2 "2023-09-26T17:46:56Z")

</div>

Hi @dataturnsmeon, whether you specify `barmode = 'group'` or not you get the same result, so I would say this behavior does not come from the barmode.

You might want to use a histogram in this case rather than a bar chart and pass the column `'sex'` into the `color` argument.
