
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set 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]
Advertisements