I'm doing visualization and I can create what I want in plotly express but I have to do it many times with different features so I prefer to use graph_objs to make subplots but I don't know how to create them.
fig = px.histogram(eda, x="HeartDisease", color="Sex", barmode="group", height=450, width = 450) fig.show()
but when I try to do it in graph fig.add_trace(go.Histogram( x = eda['HeartDisease'], name=eda.Sex))
error: The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string
fig.add_trace(go.Histogram( x = eda['HeartDisease'], color=eda.Sex))
error: Bad property path: color
I hope you can help me!
the data
| Sex | HeartDisease |
|---|---|
| Male | HeartDisease |
| Female | Normal |
| Female | HeartDisease |
| Male | HeartDisease |
| Male | Normal |


