Is to possible to add a line separator between different bar graphs ? Like this :
Thank you
Hi @BeginnerDash !
Yes, you can add a line like that with fig.add_vline(), like this:
import plotly.express as px
long_df = px.data.medals_long()
fig = px.bar(long_df, x="nation", y="count", color="medal", title="Long-Form Input")
fig.add_vline(x=0.5)
fig.show()
For barplots with categorical x axes, to specify the position between two var you have to indicate a number ending in .5. In your case, the code would be:
fig.add_vline(x=1.5, line_color='red')
You have more information about it here: Horizontal and vertical lines and rectangles in Python