Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib show two distinct plots

# credit to the Stack Overflow user in the source link
import matplotlib.pytplot as plt

fig1 = plt.figure(1)
""" generate your first plot (plt.hist, plt.plot etc.) """
fig1.show()

fig2 = plt.figure(2)
""" generate your second plot """
fig1.show()

input() # to keep both figures and choose them on the fly (in Python 3)
Comment

PREVIOUS NEXT
Code Example
Python :: COLLECTING 
Python :: pafy python documentation 
Python :: most efficient fibonacci number algorithm 
Python :: python get unicode spaces 
Python :: python warshall algorithm stackoverflow 
Python :: brython implemantation 
Python :: how to print a text 
Python :: powershell not printing until ctrl c 
Python :: import cmath python 3 
Python :: convert from python to curl 
Python :: print the list item dtype 
Python :: fetch api python 
Python :: nested list comprehensions 
Python :: np.all() 
Python :: python object has no attribute 
Python :: numpy shuffle along axis 
Python :: pygame get rect 
Python :: pandas sort values in groupby 
Python :: def tkinter 
Python :: pygame buttons 
Python :: compute confusion matrix using python 
Python :: how to extract digits from a string in python 
Python :: how to download chatterbot 
Python :: get dataframe name python 
Python :: list all pip packages 
Python :: filter json python 
Python :: show columns with nan pandas 
Python :: ceil function in python 
Python :: copy multiple files from one folder to another folder 
Python :: pandas transform vs filter 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =