Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How to Add a Title to Seaborn Plots

# import pandas library
import pandas as pd
from pyparsing import line
import seaborn as sns
import matplotlib.pyplot as plt

# create pandas DataFrame
df = pd.DataFrame({'team': ['India', 'South Africa', 'New Zealand', 'England'],
                   'points': [10, 8, 3, 5],
                   'runrate': [0.5, 1.4, 2, -0.6],
                   'wins': [5, 4, 2, 2]})

# plot the data frame
line_plt = sns.lineplot(data = df)
line_plt.set(title = "ICC World Cup Standings")
plt.show()
Comment

seaborn set title

# plot the data
lineplt = sns.lineplot(x= 'column_x', y="column_y", data=dataframe)
# Creating seaborn Title
lineplt.set(title = 'Your Title')
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: python format only 1 decimal place 
Python :: today date python 
Python :: flask post 
Python :: extract text from a pdf python 
Python :: python create file if not exists 
Python :: link python3 to python3.7 
Python :: date format django template filter 
Python :: how to make jupyterlab see other directory 
Python :: no limit row pandas 
Python :: matplotlib log2 xaxis 
Python :: change py version in colab 
Python :: normalise list python 
Python :: pandas predict average moving 
Python :: printing with colors 
Python :: rotate image pyqt5 
Python :: open a filename starting with in python 
Python :: how to cnovert a decimal to fraction python 
Python :: python webbrowser 
Python :: python suppress exponential notation 
Python :: python pandas csv to xlsx semicolon 
Python :: bail bond cowboys 
Python :: Set up and run a two-sample independent t-test 
Python :: remove every file that ends with extension in python 
Python :: upgrade python to 3.9 i linux 
Python :: pylint: disable=unused-argument 
Python :: converting column data to sha256 pandas 
Python :: how to use an indefinite number of args in python 
Python :: media url django 
Python :: python elementtree build xml 
Python :: get all files of a drive folder to google colab 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =