Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Extracted PeakMap 3D ms_matplotlib#
This shows a peakmap across m/z and retention time, plotted in 3D.

/home/runner/work/pyopenms_viz/pyopenms_viz/pyopenms_viz/_matplotlib/core.py:247: UserWarning:
The figure layout has changed to tight
<Axes3D: title={'center': 'PeakMap'}, xlabel='Retention Time', ylabel='mass-to-charge', zlabel='Intensity'>
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")
# Code to plot a peakmap
df.plot(
kind="peakmap", x="rt", y="mz", z="int", aggregate_duplicates=True, plot_3d=True
)
Total running time of the script: (0 minutes 0.891 seconds)