 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP 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
How to show two figures using Matplotlib?
We can use the method, plt.figure(), to create the figures, and then, set their titles by passing strings as arguments.
Steps
- Create a new figure, or activate an existing figure, with the window title “Welcome to figure 1”. 
- Draw a line using plot() method, over the current figure. 
- Create a new figure, or activate an existing figure, with the window title “Welcome to figure 2”. 
- Draw a line using plot() method, over the current figure. 
- Using plt.show(), show the figures. 
Example
from matplotlib import pyplot as plt plt.figure("Welcome to figure 1") plt.plot([1, 3, 4]) plt.figure("Welcome to figure 2") plt.plot([11, 13, 41]) plt.show() Output

Advertisements
 