Plotting functions for pymzML
Class to plot pymzml.spec.Spectrum as svg/xhtml.
Parameters: | filename (string) – Name for the output file. Default = “spectra.xhtml” |
---|
Example:
>>> import pymzml, get_example_file
>>> mzMLFile = 'profile-mass-spectrum.mzml'
>>> example_file = get_example_file.open_example(mzMLFile)
>>> run = pymzml.run.Run("../mzML_example_files/"+mzMLFile, precisionMSn = 250e-6)
>>> p = pymzml.plot.Factory()
>>> for spec in run:
>>> p.newPlot()
>>> p.add(spec.peaks, color=(200,00,00), style='circles')
>>> p.add(spec.centroidedPeaks, color=(00,00,00), style='sticks')
>>> p.add(spec.reprofiledPeaks, color=(00,255,00), style='circles')
>>> p.save( filename="output/plotAspect.xhtml" , mzRange = [745.2,745.6] )
Add data to the graph.
Parameters: |
|
---|
NOTE: The data format for label style is [( mz1, ‘label1’ ), ( mz2, ‘label2’ ), ( mz3, ‘label3’ ) ].
Returns summary about the plotting factory, i.e.how many plots and how many datasets per plot.
Add new plot to the plotFactory.
Parameters: |
|
---|
Saves all plots and their data points that have been added to the plotFactory.
Parameters: |
|
---|