.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/ms_plotly/plot_mobilogram_ms_plotly.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_plotly_plot_mobilogram_ms_plotly.py: Mobilogram ms_plotly ================ This example makes a simple plot This example shows how to use different approaches. .. GENERATED FROM PYTHON SOURCE LINES 8-31 .. raw:: html


.. code-block:: Python import pandas as pd from pyopenms_viz.util import download_file pd.options.plotting.backend = "ms_plotly" # GitHub raw URL (primary) with Zenodo as backup url = "https://raw.githubusercontent.com/OpenMS/pyopenms_viz/main/test/test_data/ionMobilityTestFeatureDf.tsv" backup_url = ( "https://zenodo.org/records/17904352/files/ionMobilityTestFeatureDf.tsv?download=1" ) local_path = "ionMobilityTestFeatureDf.tsv" download_file(url, local_path, backup_url=backup_url) df = pd.read_csv(local_path, sep="\t") df.plot( kind="mobilogram", x="im", y="int", by="Annotation", aggregate_duplicates=True, legend_config=dict(bbox_to_anchor=(1, 0.7)), ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.061 seconds) .. _sphx_glr_download_gallery_ms_plotly_plot_mobilogram_ms_plotly.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_plotly/plot_mobilogram_ms_plotly.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_mobilogram_ms_plotly.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_mobilogram_ms_plotly.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_mobilogram_ms_plotly.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_