Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Mobilogram ms_matplotlib#
This example makes a simple plot This example shows how to use different approaches.

<Axes: title={'center': 'Mobilogram'}, xlabel='Ion Mobility', ylabel='Intensity'>
import os
import pandas as pd
from pyopenms_viz.util import download_file
pd.options.plotting.backend = "ms_matplotlib"
local_path = "ionMobilityTestFeatureDf.tsv"
url = "https://zenodo.org/records/17904352/files/ionMobilityTestFeatureDf.tsv?download=1"
download_file(url, local_path)
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)),
)
Total running time of the script: (0 minutes 0.122 seconds)