I am using pandas builtin plotting as per below. However as soon as the plotting method returns, the plot disappears. How can I keep the plot(s) open until I click on them to close?
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
def plot_data():
#...create dataframe df1
pd.options.display.mpl_style = 'default'
df1.boxplot()
df1.hist()
if __name__ == '__main__':
plot_data()