Answers for "how to use horizontal bar plot in python"

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()
Posted by: Guest on June-13-2020
0

horizontal bar plot

eg1

dataframe['col'].plot.barh()
plt.show()

#eg2 series horizontal bar

series.plot.barh()

#eg3

plt.barh(df['col'],df['col'])
plt.show()
Posted by: Guest on August-10-2021

Code answers related to "how to use horizontal bar plot in python"

Python Answers by Framework

Browse Popular Code Answers by Language