You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
Hi, I try to make a mosaic plot with bar in plotly express. Because mosaic have different width and height proportion depends on the frequency of data, so I update the weight of the bar and change bargap. I used the code below figure = px.bar(data_new, x='Mode',y='freq', color = "GENDER",orientation='v') figure.layout = {'bargap':0.025, 'barmode':'relative'} figure.update_traces(width = [0.05, 0.25, 0.15, 0.1, 0.2, 0.4, 0.2,0.1])
and produce plot like this:
My code is doesn't change any gap of my bar, but when I delete the width like this code figure = px.bar(data_new, x='Mode',y='freq', color = "GENDER",orientation='v') figure.layout = {'bargap':0.025, 'barmode':'relative'}
the bargap is work like this picture
Are there other ways to use barsgap and width simultaneously?
Thank you.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, I try to make a mosaic plot with bar in plotly express. Because mosaic have different width and height proportion depends on the frequency of data, so I update the weight of the bar and change bargap. I used the code below
figure = px.bar(data_new, x='Mode',y='freq', color = "GENDER",orientation='v')
figure.layout = {'bargap':0.025, 'barmode':'relative'}
figure.update_traces(width = [0.05, 0.25, 0.15, 0.1, 0.2, 0.4, 0.2,0.1])
and produce plot like this:
My code is doesn't change any gap of my bar, but when I delete the width like this code
figure = px.bar(data_new, x='Mode',y='freq', color = "GENDER",orientation='v')
figure.layout = {'bargap':0.025, 'barmode':'relative'}
the bargap is work like this picture
Are there other ways to use barsgap and width simultaneously?
Thank you.
The text was updated successfully, but these errors were encountered: