- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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 get rid of grid lines when plotting with Seaborn + Pandas with secondary_y?
To get rid of grid lines when plotting with Pandas with secondary_y, we can take the following steps −
Create a data frame using DataFrame wth keys column1 and column2.
Use data frame data to plot the data frame. To get rid of gridlines, use grid=False.
To display the figure, use show() method.
Example
import pandas as pd from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True data = pd.DataFrame({"column1": [4, 6, 7, 1, 8], "column2": [1, 5, 7, 8, 1]}) data.plot(secondary_y=[5], grid=False) plt.show()
Output
- Related Articles
- How to make custom grid lines in Seaborn heatmap?
- Plotting with seaborn using the matplotlib object-oriented interface
- Python Pandas - Draw a violin plot and set quartiles as horizontal lines with Seaborn
- How to display horizontal grid lines in a JTable with Java?
- How to display vertical grid lines in a table with Java?
- Plotting a heatmap for 3 columns in Python with Seaborn
- Python Pandas - Draw a boxplot and display the datapoints on top of boxes by plotting Swarm plot with Seaborn
- Python Pandas - Draw a set of Horizontal point plots but do not draw lines to connect points with Seaborn
- How to get rid of smartphone addiction?
- How to get rid of Love Bites?
- Plot a lineplot with Seaborn – Python Pandas
- Create a Scatter Plot with SeaBorn – Python Pandas
- Create a Box Plot with SeaBorn – Python Pandas
- Create a Violin Plot with SeaBorn – Python Pandas
- Create a Swarm Plot with SeaBorn – Python Pandas

Advertisements