Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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()
Comment

horizontal bar plot python

import seaborn as sns

sns.barplot(data=df, orient = 'h')
Comment

horizontal bar plot matplotlib

import matplotlib.pyplot as plt
   
Product = ['Computer','Monitor','Laptop','Printer','Tablet']
Quantity = [320,450,300,120,280]

plt.barh(Product,Quantity)
plt.title('Store Inventory')
plt.ylabel('Product')
plt.xlabel('Quantity')
plt.show()
Comment

horizontal barplot

df.column.plot(kind='barh')
Comment

PREVIOUS NEXT
Code Example
Python :: how to make django model field case insensitive 
Python :: python kivy 
Python :: python sort dictionary by key 
Python :: python square all numbers in list 
Python :: file base name and extension python 
Python :: select non nan values python 
Python :: python checking if something is equal to NaN 
Python :: python font 
Python :: chrome driver in python selenium not working 
Python :: pandas strip whitespace 
Python :: convert python datetime to string 
Python :: scikit image 0.16.2 
Python :: get prime number python 
Python :: numpy add new column 
Python :: drop all characters after a character in python 
Python :: django fixtures. To dump data 
Python :: change string list to int list python 
Python :: create dictionary from keys and values python 
Python :: pytorch optimizer change learning rate 
Python :: time py 
Python :: exit python terminal 
Python :: python Correlation matrix of features 
Python :: drupal 8 request_time 
Python :: python for k, v in dictionary 
Python :: appending to a file in python 
Python :: how to clear a list in python 
Python :: how to fix Crypto.Cipher could not be resolved in python 
Python :: how to create model in tensorflow 
Python :: python make comparison non case sensitive 
Python :: python fillna with mean in a dataframe 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =