Mass Spectrometry, Tutorial, Python, Data Analysis, Research.
numbers_of_peaks = [len(s.peaks.mz) for s in spectrums] from matplotlib import pyplot as plt plt.figure(figsize=(5,4), dpi=150) plt.hist(numbers_of_peaks, 20, edgecolor="white") plt.title("Peaks per spectrum (before filtering)") plt.xlabel("Number of peaks in spectrum") plt.ylabel("Number of