Group bars and continuous colorscale

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

import as px
df =
fig =, x="sex", y="total_bill",
             color='total_bill', barmode='group',

Why does it render a stacked bar chart?

Does it not support having continuous colorscale for grouped bars?

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.