My code reads all the text file in the folder, turns it into an array and plots a histogram of each data using a for cycle, pretty simple stuf, but I want to save all it returns, all the histograms into a single pdf file. I know the function:
plt.savefig('file.pdf')
works but since it's in a for cycle it will only save the last one, I mean it overwrites on it. Is there a function to add the other histograms or should I change the code?