✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Error bars for two groups in a stacked bar graph...?

Hi, I am trying to make a stacked bargraph. The wide format dataset contains 9 categoryorders (X values) and two variables (Y-values).

I simply want to add error bars for BOTH set of variables.

bar1 = px.bar(data, x=“color”, y=[“PHB_wt%”, “PHV_wt%”], error_y=[“st_dev_PHB_%”, “st_dev_PHV_%”])

gives the error
“All arguments should have the same length. The length of argument error_y is 2, whereas the length of previously-processed arguments [‘color’] is 9”

If i only add one column as error_y

bar1 = px.bar(data, x=“color”, y=[“PHB_wt%”, “PHV_wt%”], error_y=“st_dev_PHB_%”)

then the same error bar is added to both Y variables. Shown here as as stacked bar plot.

The question is simply: How to use px.bar to code two independent error bars?

Thanks
Mikkel

(see also)