Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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 :: Python use number twice without variable 
Python :: python stop stdout 
Python :: get legend lables and handles from plot in matplotlib 
Python :: Using Python Permutations to Find the order in lexicographical sorted order 
Python :: reverse relationship in django for one to one field for usage in Django rest serializer 
Python :: google scikit learn decision tree 
Python :: iterate over rows in numpy matrix python 
Python :: what is in the python built in namespace 
Python :: df max count syntax 
Python :: pandas drop 1970 
Python :: pytorch torchaudio torchvision cu113 
Python :: python write data to file with permissions 
Python :: flask stream with data/context 
Python :: how to get var value by name godot 
Python :: foreign key django createview 
Python :: Passing Arrays to Methods 
Python :: python download images from unsplash 
Python :: making your own range function with step in python 
Python :: python subtract between list 
Python :: maximun row and columns in python 
Python :: not equal to in python 
Python :: how to import files from desktop to python 
Python :: importing python modules from a folder 
Python :: first step creating python project 
Python :: django group permissions method 
Python :: symmetric_difference() Function of sets in python 
Python :: cv2.imshow not working in vscode 
Python :: Django - Knox auth setup 
Python :: extract decimal number from string python 
Python :: python if string has spaces 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =