

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Plot width settings in ipython notebook
Using plt.rcParams["figure.figsize"], we can get the width setting.
Steps
To get the plot width setting, use plt.rcParams["figure.figsize"] statement.
Override the plt.rcParams["figure.figsize"] with a tuple (12, 9).
After updating the width, get the updated width using plt.rcParams["figure.figsize"].
Examples
In IDE
Example
import matplotlib.pyplot as plt print("Before, plot width setting:", plt.rcParams["figure.figsize"]) plt.rcParams["figure.figsize"] = (12, 9) print("Before, plot width setting:", plt.rcParams["figure.figsize"])
Output
Before, plot width setting: [6.4, 4.8] Before, plot width setting: [12.0, 9.0]
In IPython
Example
In [1]: from matplotlib import pyplot as plt In [2]: plt.rcParams["figure.figsize"]
Output
Out[2]: [6.4, 4.8]
- Related Questions & Answers
- How to dynamically update a plot in a loop in Ipython notebook?
- Automatically run %matplotlib inline in IPython Notebook
- Matplotlib animation not working in IPython Notebook?
- How to hide <matplotlib.lines.Line2D> in IPython notebook?
- Displaying rotatable 3D plots in IPython or Jupyter Notebook
- Save figure as file from iPython notebook using Matplotlib
- How to set the matplotlib figure default size in ipython notebook?
- Best way to display Seaborn/Matplotlib plots with a dark iPython Notebook profile
- How do I show the same Matplotlib figure several times in a single IPython notebook?
- Make 3D plot interactive in Jupyter Notebook (Python & Matplotlib)
- How to display a Dataframe next to a Plot in Jupyter Notebook?
- Notebook widget in Tkinter
- Using Tkinter in Jupyter Notebook
- Hide Matplotlib descriptions in Jupyter notebook
- Defining user lock settings in SAP HANA
Advertisements