- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- 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.
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.
from matplotlib import pyplot as plt plt.figure("Welcome to figure 1") plt.figure("Welcome to figure 2") # Active Figure plt.show()
- 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?