Mass Spectrum
Chart overview
Mass spectra display ion abundance as vertical lines at each mass-to-charge ratio, allowing identification of molecular ions, isotope patterns, and fragmentation pathways.
Key points
- Analytical chemists and proteomics researchers annotate the molecular ion peak, base peak, and characteristic fragment ions to confirm compound identity.
- High-resolution mass spectra are essential for elemental composition determination in natural product and pharmaceutical research.
Python Tutorial
How to create a mass spectrum in Python
Use the full tutorial for implementation details, troubleshooting, and chart variations in matplotlib, seaborn, and plotly.
Complete Guide to Scientific Data VisualizationExample Visualization

Create This Chart Now
Generate publication-ready mass spectrums with AI in seconds. No coding required – just describe your data and let AI do the work.
View example prompt
"Create a mass spectrum stick plot from my data. Plot m/z on the x-axis and relative intensity (normalized to 100%) on the y-axis using vertical lines. Annotate the molecular ion peak [M+H]+ and the top 5 most abundant fragment ions with their m/z values. Use journal formatting with Arial font and no top or right spines."
How to create this chart in 30 seconds
Upload Data
Drag & drop your Excel or CSV file. Plotivy securely processes it in your browser.
AI Generation
Our AI analyzes your data and generates the Mass Spectrum code automatically.
Customize & Export
Tweak the design with natural language, then export as high-res PNG, SVG or PDF.
Newsletter
Get one weekly tip for better mass spectrums
Join researchers receiving concise Python plotting techniques to improve chart clarity and reduce revision cycles.
Python Code Example
Console Output
Figure saved: plotivy-mass-spectrum.png
Common Use Cases
- 1Confirming molecular weight and fragmentation pattern of synthesized compounds
- 2Identifying unknown metabolites in untargeted metabolomics workflows
- 3Characterizing peptide sequences through tandem MS fragmentation spectra
- 4Detecting isotope distributions for elemental composition confirmation
Pro Tips
Normalize all intensities to the base peak set to 100% for cross-sample comparison
Use matplotlib vlines instead of bar for authentic stick-spectrum appearance
Annotate only peaks above a threshold (e.g., >5% relative abundance) to avoid cluttered labels
Add isotope pattern envelopes as a shaded overlay when presenting high-resolution data
Long-tail keyword opportunities
High-intent chart variations
Library comparison for this chart
matplotlib
Best when you need full control over axis formatting, annotation placement, and journal-specific styling for mass-spectrum.
numpy
Useful in specialized workflows that complement core Python plotting libraries for mass-spectrum analysis tasks.
Scientific Chart Selection Cheat Sheet
Not sure whether to use a Violin Plot, Box Plot, or Ridge Plot? Download our single-page reference mapping the most-used scientific chart types, exactly when to use them, and the core Matplotlib/Seaborn functions.