Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

horizontal bar chart with seaborn

import seaborn as sns
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(10,10))

sns.set_color_codes("pastel")
# where df is a dataframe with two columns "X-DATA" and "Y-DATA"
sns.barplot(x="X-DATA", y="Y-DATA", data=df, orient = 'h', color="goldenrod", label="Some Label")

ax.legend(ncol=2, loc="lower right", frameon=True)
ax.set(ylabel="Y-Label",xlabel="X-Label")
ax.legend()
sns.despine(left=True, bottom=True)
Comment

PREVIOUS NEXT
Code Example
Python :: timeout exception in selenium python 
Python :: python cv2 read image grayscale 
Python :: how to delete last N columns of dataframe 
Python :: create guid python 
Python :: python time.strptime milliseconds 
Python :: python press key to break 
Python :: working directory python 
Python :: pandas plotly backend 
Python :: Write a line to a text file using the write() function 
Python :: no module named torch 
Python :: python 3 pm2 
Python :: decimal places django template 
Python :: python savefig full screen 
Python :: plt vertical line 
Python :: numpy to csv 
Python :: python numpy installation 
Python :: python youtube downloader mp3 
Python :: ValueError: numpy.ndarray size changed 
Python :: install curses python 
Python :: python discord bot join voice channel 
Python :: django add media 
Python :: python get date file last modified 
Python :: show rows with a null value pandas 
Python :: python url join 
Python :: random pick any file from directory python 
Python :: make a zero list python 
Python :: sklearn random forest regressor 
Python :: search string array python 
Python :: créer des variable dynamiques python 
Python :: python get all folders in directory 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =