.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/ms_matplotlib/plot_spectrum_dia_ms_matplotlib.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_ms_matplotlib_plot_spectrum_dia_ms_matplotlib.py: Spectrum of Extracted DIA Data ms_matplotlib ======================================= This example shows a spectrum from extracted data. No binning is applied. .. GENERATED FROM PYTHON SOURCE LINES 7-28 .. image-sg:: /gallery/ms_matplotlib/images/sphx_glr_plot_spectrum_dia_ms_matplotlib_001.png :alt: Mass Spectrum :srcset: /gallery/ms_matplotlib/images/sphx_glr_plot_spectrum_dia_ms_matplotlib_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Annotation color: None | .. code-block:: Python import pandas as pd from pyopenms_viz.util import download_file pd.options.plotting.backend = "ms_matplotlib" url = "https://zenodo.org/records/17904352/files/ionMobilityTestFeatureDf.tsv?download=1" local_path = "ionMobilityTestFeatureDf.tsv" download_file(url, local_path) df = pd.read_csv(local_path, sep="\t") df.plot( kind="spectrum", x="mz", y="int", custom_annotation="Annotation", annotate_mz=True, bin_method="none", annotate_top_n_peaks=5, aggregate_duplicates=True, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.285 seconds) .. _sphx_glr_download_gallery_ms_matplotlib_plot_spectrum_dia_ms_matplotlib.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://notebooks.gesis.org/binder/v2/gh/OpenMS/pyopenms_viz/gh_pages?filepath=notebooks/gallery/ms_matplotlib/plot_spectrum_dia_ms_matplotlib.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_spectrum_dia_ms_matplotlib.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_spectrum_dia_ms_matplotlib.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_spectrum_dia_ms_matplotlib.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_