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

PREVIOUS NEXT
Code Example
Python :: django create token for user 
Python :: return max repeated value in list 
Python :: dice rolling simulator python 
Python :: how to extract numbers from a list in python 
Python :: convert image to black and white python 
Python :: tofixed in python 
Python :: show all columns pandas jupyter notebook 
Python :: localhost server in Python 
Python :: how to create random tensor with tensorflow 
Python :: Import CSV Files into R Using fread() method 
Python :: how to shutdown a windows 10 computer using python 
Python :: modulus of python complex number 
Python :: change python version ubuntu 
Python :: charcodeat python 
Python :: jupyter lab 
Python :: pandas change multiple column types 
Python :: add dir to path python 
Python :: time until 2021 
Python :: python reverse linked list 
Python :: python set negative infinity 
Python :: python remove duplicates words from string 
Python :: khan academy 
Python :: Python Tkinter timer animation 
Python :: pasal 
Python :: Concatenate strings from several rows using Pandas groupby 
Python :: how to check if string is camelcase python 
Python :: python restart script 
Python :: python while not 
Python :: should i make tkinter in classes ? , Best way to structure a tkinter application? 
Python :: ImportError: No module named flask 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =