I create some plots in one run of code, the plots are in plots tab. I tried to delete it all each time i rerun it but somehow the previous plots are still there not closing, it only creates new plots without clearing the previous plots from the previous run. I already tried to use plt.close('all') but it does not work. How do i clear all plots every time i rerun the code?
Here's my code
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
plt.close('all')
avo_sales = pd.read_csv('avocados.csv')
avo_sales.rename(columns = {'4046':'small Hass sold','4225':'large Hass sold','4770':'xlarge Hass sold'},
inplace= True)
for column in avo_sales.columns[2:11]:
sns.set()
fig, ax = plt.subplots()
sns.set(style="ticks")
sns.boxplot(column, data= avo_sales) # column is chosen here
sns.despine(offset=10, trim=True)

