- 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 set the matplotlib figure default size in ipython notebook?
To set the matplotlib figure default size in iPython, use the following steps −
To check the default figure size, use plt.rcParams["figure.figsize"] over the ipython shell.
Now to set the figure size, override the plt.rcParams["figure.figsize"] variable with a tuple i.e., (20, 10).
After overriding the plt.rcParams["figure.figsize"] variable, you can use it to get changed figure size.
Example
import matplotlib.pyplot as plt print("Before, figure default size is: ", plt.rcParams["figure.figsize"]) plt.rcParams["figure.figsize"] = (20, 10) print("After, figure default size is: ", plt.rcParams["figure.figsize"])
Output
Before, figure default size is: [6.4, 4.8] After, figure default size is: [20.0, 10.0]
- Related Articles
- Save figure as file from iPython notebook using Matplotlib
- How do I show the same Matplotlib figure several times in a single IPython notebook?
- Automatically run %matplotlib inline in IPython Notebook
- Matplotlib animation not working in IPython Notebook?
- How to hide in IPython notebook?
- Best way to display Seaborn/Matplotlib plots with a dark iPython Notebook profile
- How to set the current figure in Matplotlib?
- How to set a default colormap in Matplotlib?
- How to dynamically update a plot in a loop in Ipython notebook?
- How to change the default path for "save the figure" in Matplotlib?
- Plot width settings in ipython notebook\n\n
- How to set a default column size in CSS Grid
- Change figure size and figure format in Matplotlib
- Displaying rotatable 3D plots in IPython or Jupyter Notebook
- How to set the margins of a Matplotlib figure?

Advertisements