6.2.2 Advanced Bar Chart

1. Horizontal Bar

In chapter 6.1.1 we have shown several regular bar charts. To make a horizontal bar is very intuitive, you just need to add a 'orientation='h'

import plotly.express as px
import plotly.graph_objects as go
df = px.data.tips()
fig = px.bar(df, x="total_bill", y="day", orientation='h')
fig.show()
Grouped Horizontal Bar
Stacked Horizontal Bar

2. Relative Bar

Relative Bar

3. Customized Bar

Customerized Bar
Bar with text annotations
Bar with Customized colors

Last updated

Was this helpful?