In the below chart, I would like to group by machine and stack them based on their shifts.
code:
fig = px.bar(df_plot,
x=“Date”,
y=“Efficiency”,
color=“Machine”,
barmode=‘group’,
pattern_shape=“DayNight”,
)
fig.show()
df:
Date Machine DayNight Efficiency
138 2023-05-08 Eq_01 DAY 1.00
139 2023-05-08 Eq_02 DAY 1.62
140 2023-05-08 Eq_03 DAY 1.85
141 2023-05-08 Eq_06 DAY 1.09
142 2023-05-08 Eq_07 DAY 1.85
143 2023-05-08 Eq_21 DAY 0.00
144 2023-05-08 Eq_52 DAY 1.00
145 2023-05-08 Eq_53 DAY 1.05
146 2023-05-08 Eq_54 DAY 1.01
147 2023-05-08 Eq_55 DAY 0.12
148 2023-05-08 Eq_01 Night 1.04
149 2023-05-08 Eq_02 Night 0.00
150 2023-05-08 Eq_03 Night 1.00
151 2023-05-08 Eq_06 Night 1.21
152 2023-05-08 Eq_07 Night 0.98
153 2023-05-08 Eq_21 Night 1.00
154 2023-05-08 Eq_52 Night 1.00
155 2023-05-08 Eq_53 Night 0.23
156 2023-05-08 Eq_54 Night 1.99
df_plot
Thanks for your help