- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to add a title on Seaborn lmplot?
To add a title on Seaborn Implot, we can take the following steps−
- Set the figure size and adjust the padding between and around the subplots.
- Make a Pandas dataframe with two columns, X-Axis and Y-Axis
- Use implot() method.
- Get the current axis using gca() method.
- To display the figure, use show() method.
Example
import pandas import matplotlib.pylab as plt import seaborn as sns import numpy as np plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True df = pandas.DataFrame({"X-Axis": [np.random.randint(10) for i in range(10)], "Y-Axis": [i for i in range(10)]}) bar_plot = sns.lmplot(x='X-Axis', y='Y-Axis', data=df, height=3.5) ax = plt.gca() ax.set_title("Random Data Implot") plt.show()
Output
- Related Articles
- How to add a legend on Seaborn facetgrid bar plot using Matplotlib?
- How to add a chart title in Excel?
- How to add percentages on top of bars in Seaborn using Matplotlib?
- How to add a title to JTable in Java Swing?
- How to Add Title to Subplots in Matplotlib?
- How to add a title in anchor tag using jQuery?
- How to add a title to an existing line border in Java?
- How to show the title for the diagram of Seaborn pairplot() or PridGrid()? (Matplotlib)
- How to get data labels on a Seaborn pointplot?
- How to add title to regression model using stargazer in R?
- How do we add document title in HTML?
- How to Add Outline or Edge Color to Histogram in Seaborn?
- How to add text in a heatmap cell annotations using seaborn in Python?
- How to add Regression Line Per Group with Seaborn in Python?
- How to remove the axis tick marks on a Seaborn heatmap?

Advertisements