Plotly.Express.bar gap within grouped bar

I am plotting below data in form of grouped bar.

Student roll num, score, subject

Fig= px. Bar(df, x=‘roll_num’, y=‘score’, color=‘subject’, barmode=‘group’

St.plotly_chart(fig, use_container_width=true, height=200)

This is plotting the data as required. But when i filter the data using subject checkbox. There is gap between the bars within the group. Any suggestions?

Hey @Sam23 Welcome to the community.

It’s not clear what issue you are facing. Try adding some explanation, data, code.