Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting #7

Open
AdriennR opened this issue Nov 20, 2023 · 1 comment
Open

Plotting #7

AdriennR opened this issue Nov 20, 2023 · 1 comment

Comments

@AdriennR
Copy link

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

@jmrohwer
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants