- 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 current figure in Matplotlib?
Using the figure() method, we can set the current figure.
Steps
Create a new figure, or activate an existing figure, with the window title “Welcome to figure 1”.
Create a new figure, or activate an existing figure, with the window title “Welcome to figure 2”.
Using plt.show(), show the figures.
Example
from matplotlib import pyplot as plt plt.figure("Welcome to figure 1") plt.figure("Welcome to figure 2") # Active Figure plt.show()
Output
- Related Articles
- How to set the margins of a Matplotlib figure?
- How to set the matplotlib figure default size in ipython notebook?
- How do you get the current figure number in Python's Matplotlib?
- How to set local rcParams or rcParams for one figure in matplotlib?
- What is the preferred way to set Matplotlib figure/axes properties?
- How to set "step" on axis X in my figure in Matplotlib Python 2.6.6?
- How to set the current working directory in Python?
- How to set the xticklabels for date in matplotlib?
- How to retrieve colorbar instance from figure in Matplotlib?
- How to change the default path for "save the figure" in Matplotlib?
- How to draw axis in the middle of a figure in Matplotlib?
- How to set timeout to pyplot.show() in Matplotlib?
- How to show multiple images in one figure in Matplotlib?
- How can I set the background color on specific areas of a Pyplot figure using Matplotlib?
- How to convert Matplotlib figure to PIL Image object?

Advertisements