🖼️ Visualize Data
After initializing the ChromAnalyzer
, the loaded spectra and identified peaks can be visualized in different ways. Eight all spectra can be plotted in a single interactive plot, or individual spectra and the quantified peaks can be plotted separately, providing means for visual inspection prior to further analysis and processing.
Visualize all spectra simultaneously
The visualize_spectra
method plots all spectra in a single interactive plot. The spectra are colored according to the sample name. The plot can be zoomed in and out. When specifying dark_mode=True
, the plot will be displayed in dark mode.
Example
from chromatopy import ChromAnalyzer
data_dir = "data/asm"
# Initialize the ChromAnalyzer
analyzer = ChromAnalyzer.read_asm(
path=data_dir,
ph=7.4,
temperature=25,
mode="timecourse",
)
# and visualize the spectra
analyzer.visualize_spectra()
Please reload the page if the visualization is not displayed correctly
Visualize Peaks and Spectra
The visualize_all
method plots the identified peaks and the corresponding spectra. The spectra are colored according to the sample name. The plot can be zoomed in and out. When specifying dark_mode=True
, the plot will be displayed in dark mode. Furthermore, when setting assigned_only=True
, only the peaks that have been assigned to a molecule are plotted. How assignemt of molecule to peaks is done is explained in the next chapter.