horizontal Bar chart using Plotly in Python code example
Example 1: how to plotting horizontal bar on matplotlib
import matplotlib.pyplot as plt
data = [5., 25., 50., 20.]
plt.barh(range(len(data)), data)
plt.show()
Example 2: plotly vertical bar chart
import plotly.express as px
df = px.data.tips()
fig = px.bar(df, x="total_bill", y="day", orientation='h')
fig.show()