Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Plot width settings in ipython notebook\\n\\n
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]
Advertisements
