- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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 increase the line thickness of a Seaborn Line?
63 Lectures 6 hours
To increase the line thickness of a Seaborn line, we can take the following steps
Set the figure size and adjust the padding between and around the subplots.
Create a dataframe, df, of two-dimensional, size-mutable, potentially heterogeneous tabular data.
Create a Seaborn line plot with linewidth value in the argument. Here we have set linewidth=7.
Rotate the tick params, i.e., labels by 45 degrees.
To display the figure, use Show() method.
import seaborn as sns from matplotlib import pyplot as plt import pandas as pd import numpy as np plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True df = pd.DataFrame( dict( time=list(pd.date_range("2021-01-01 12:00:00", periods=10)), speed=np.linspace(1, 10, 10) ) ) ax = sns.lineplot(x="time", y="speed", data=df, lw=7) ax.tick_params(rotation=45) plt.show()
It will produce the following output −
- How to increase the thickness of error line in a Matplotlib bar chart?
- How to increase the width of the X-axis line for a ggplot2 graph?
- How to increase the thickness of histogram lines in base R?
- How to change the line color in a Seaborn linear regression jointplot?
- How to set the image thickness for line drawing using imgesetthickness() function in PHP?
- How to plot a dashed line on a Seaborn lineplot in Matplotlib?
- How to increase the width of the median line in boxplot using ggplot2 in R?
- How to show different colors for points and line in a Seaborn regplot?
- How to execute Python multi-line statements in the one-line at command-line?
- Python - Create a Time Series Plot using Line Plot with Seaborn
- How to create a line chart using ggplot2 with a vertical line in R?
- How to increase the font size of the legend in my Seaborn plot using Matplotlib?
- How to compare two sorted files line by line in the Linux system?
- How to set a line color to orange, and specify line markers in Matplotlib?