Remove left side space in the graph

I want to remove this extra space (colored). how can I do this. I tried margin but did not work.

hi @mainul
I think you can use the range_x attribute. For example:

import plotly.express as px
df = px.data.gapminder().query("continent == 'Oceania'")
fig = px.line(df, x='year', y='lifeExp', color='country', symbol="country", range_x=[1951,2009])
fig.show()

Trying removing the range_x to see the difference.

1 Like