import plotly.express as px fig = px.bar(df, x="year", y="count", color="UCIC", text_auto=True) fig.show()