I know how to set the width of bars in a bar chart:
fig = go.Figure(data=[go.Bar(x = ['A', 'B', 'C'], y = [2, 4, 1], width=[0.5]*3)])
fig.update_layout(paper_bgcolor = 'rgba(0,0,0,0)',plot_bgcolor = 'rgba(0,0,0,0)')
fig.update_layout(bargap=0)
fig.show()
As you can see, the bargap is ignored. Because the width of bars has been set. Now, by removing the width property, we will get the following:
I desire by removing the gaps, have a thinner bar chart in the meanwhile. Now, the question is:
"How to set width and gap simultaneously in a bar chart through plotly in python?"

