import plotly.express as px fig = px.bar(x = ['a', 'b', 'c'], y = [5, 10, 12]) for data in fig.data: data["width"] = 0.15 #Change this value for bar widths fig.show()