How can I show figures separately in Matplotlib? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report In data visualization, it’s common to create multiple plots or figures for comparison, but sometimes you may need to display each plot separately. In Matplotlib, this can be easily achieved by creating and managing multiple figure objects. Most common method to create a new figure, or activate an existing figure, we use the figure() method. Let's implement the methods with examples:Method 1: Using plt.figure() to Create Separate FiguresThe plt.figure() function is essential in creating new figure objects in Matplotlib. By calling this function before plotting, you specify that all subsequent plotting commands should belong to the new figure. This enables you to separate your plots, ensuring each one appears in its own window. Using plt.figure() provides control over which figure you’re working with. It’s the most straightforward and intuitive method for beginners. Python import matplotlib.pyplot as plt import numpy as np # First figure plt.figure(1) x = np.linspace(0, 10, 100) y1 = np.sin(x) plt.plot(x, y1) plt.title("I am Figure 1") plt.show() # Second figure plt.figure(2) y2 = np.cos(x) plt.plot(x, y2) plt.title("I am Figure 2") plt.show() Output: show figures separately in MatplotlibMethod 2: Calling plt.show() After Each FigureAfter creating separate figures with plt.figure(), the plt.show() function is used to display each figure independently. If you call plt.show() after plotting each figure, Matplotlib will display them sequentially as separate entities. Python import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 10, 100) y1 = np.sin(x) y2 = np.cos(x) # First figure: Plotting the sine wave plt.figure(1) plt.plot(x, y1) plt.title("Sine Wave - Figure 1") plt.show() # Second figure: Plotting the cosine wave plt.figure(2) plt.plot(x, y2) plt.title("Cosine Wave - Figure 2") plt.show() Output:show figures separately in MatplotlibMethod 3: Using plt.subplots() for Multiple Axes in One FigureWhile not strictly for creating separate figures, plt.subplots() allows you to create multiple axes (subplots) within a single figure. This is useful when you want to compare data side by side but still prefer to work within a single figure window. Python import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 10, 100) y1 = np.sin(x) y2 = np.cos(x) fig, (ax1, ax2) = plt.subplots(1, 2) ax1.plot(x, y1) ax1.set_title("Sine Wave") ax2.plot(x, y2) ax2.set_title("Cosine Wave") plt.show() Output: or Multiple Axes in One Figure Comment More infoAdvertise with us Next Article Matplotlib.figure.Figure.show() in Python H hardiksharmmaaaa Follow Improve Article Tags : Data Visualization AI-ML-DS Python-matplotlib AI-ML-DS With Python Similar Reads How to Change the Size of Figures in Matplotlib? Matplotlib provides a default figure size of 6.4 inches in width and 4.8 inches in height. While this is suitable for basic graphs, various situations may require resizing figures for better visualization, presentation or publication. This article explores multiple methods to adjust the figure size 3 min read How to Change the Figure Size with Subplots in Matplotlib Matplotlib is a powerful plotting library in Python that allows users to create a wide variety of static, animated, and interactive plots. One common requirement when creating plots is to adjust the figure size, especially when dealing with subplots. This article will guide you through the process o 4 min read Matplotlib.figure.Figure.show() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot 2 min read Matplotlib.figure.Figure.clear() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot 1 min read Matplotlib.figure.Figure.clf() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot 1 min read Matplotlib.figure.Figure() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot 2 min read Like