I used plt.show() in different parts of the code to show some figures. But with each execution of the command plt.show(), the execution will only continue after closing the current figure. How can I show figures without having to close the current one (to see all)?
Example:
import pandas as pd
import seaborn as sn
import matplotlib.pyplot as plt
data = {'A': [45, 31, 42, 35, 39],
'B': [38, 31, 26, 28, 33],
'C': [10, 15, 17, 21, 12],
'D': [9, 14, 16, 22, 141]}
df = pd.DataFrame(data, columns=['A', 'B'])
corrMatrix = df.corr()
sn.heatmap(corrMatrix, annot=True)
plt.show() # this should be closed to continue
df = pd.DataFrame(data, columns=['C', 'D'])
corrMatrix = df.corr()
sn.heatmap(corrMatrix, annot=True)
plt.show()
BTW I'm using PyCharm on macOS.