nmrpy
nmrpy copied to clipboard
Plotting
Helo, Can I plot 2 different spectra on superposition? I only found the plot_array function, but I would like to compare two different spectra by plotting them on the same plot. Is this somehow possible?
Thank you
There is no direct method to do this but it is very easy just using standard matplotlib plotting functions. Every fid object has the associated spectral data (1D numpy array) as an attribute, e.g. fid0.data.
So you could do:
plt.plot(fid0.data)
plt.plot(fid1.data)
Of course you'd have to do some tweaking to convert index position of the array to PPM. If you are unsure look in the source code in plotting.py.