I made 3 plots in a for loop with the following code. But the first figure I create has 3 colorbars, the 2nd has 2 and the 1st has 1. So it seems the previous plot adds a colorbar to the current plot. How can I avoid this?
for f in files:
#print(f)
roi_signals = pd.read_csv(f, sep='\t')
fig = sns.heatmap(roi_signals)
fig_name = f.replace('.txt', '.png')
plt.savefig(fig_name)