PNNL-m-q / mzapy

A Python package that provides an interface to raw MS data in the MZA format.
BSD 2-Clause "Simplified" License
7 stars 1 forks source link

change how peaks are displayed in add_peaks_to_plot #24

Open dylanhross opened 2 weeks ago

dylanhross commented 2 weeks ago

Now I feel that the crosses are kind of an annoying way to depict fitted peaks. Little gaussian peaks (i.e. a gaussian peak only plotted over a range of +/- 2 FWHM of the mean) look much better and make it easier to interpret fitting results.

A snippet of how it should look:

x = xic_rt[(xic_rt >= prt - 2 * pwt) & (xic_rt <= prt + 2 * pwt)]
ax.plot(x, _gauss(x, prt, pht, pwt), "b-", lw=1)

Vs. how they are currently plotted:

ax.plot([prt, prt], [0, pht], 'b-', lw=1)
ax.plot([prt - (pwt / 2), prt + (pwt / 2)], [pht / 2, pht / 2], 'b-', lw=1)