Closed phage-GP closed 1 year ago
After reviewing the source code, you can find that the relevant api has indeed changed.
Here is the source code file Anaconda\envs\xxx\Lib\site-packages\pyopenms\Plotting.py
def plotSpectrum(s):
import pylab
x, y = s.get_peaks()
pylab.bar( x, y )
pylab.xlabel("m/z")
pylab.ylabel("Intensity")
pylab.show()
So the modified code can run successfully,
from pyopenms.Plotting import plotSpectrum
Correct, the latest documentation refers to the nightly snapshots. In 2.8 it was still called Plotting.
Describe the problem you encountered
ImportError: cannot import name 'plotting' from 'pyopenms'
What should be happening
An error occurred when I tried to use 'plot_spectrum' function according to pyopenms document
Screenshots
Here is my code:
and error report message
I want to know whether the API has changed.