I am trying to plot the data I have stored in a pandas DataFrame using plotly.express as a box plot. The df looks like the following:
This is my code for making the basic boxplot graph in plotly:
import plotly.express as px
fig = px.box(df1, x="Condition",
y="Number of Groups")
fig.show()
Giving as a result the kind of graph I was looking for:

Now, I wanna color each condition in a different color for what I use:
import plotly.express as px
fig = px.box(df1, x="Condition",
y="Number of Groups",
color="Condition")
fig.show()
Giving me this graph in which now the box plots are much narrower than normal. Does anybody knows how to avoid this? Thanks

