Generates a scatter plot of molecular mass (M) versus carbon atom count (C),
color-coded by a selected variable (z_var).
This visualization follows the concept of the Carbon-vs-Mass (CvM) diagram introduced by Reemtsma (2010).
uplot_cvm(
df,
z_var = "co_tot",
palname = "redblue",
tf = FALSE,
col_bar = TRUE,
gg_size = 12,
logo = TRUE,
plotly = FALSE,
...
)A ggplot2 or Plotly object.
A data.table containing columns:
nmMolecular mass (Da)
12CNumber of carbon atoms
z_varVariable used for color projection
Character. Column used for color mapping.
Character. Palette name passed to f_colorz().
Logical. If TRUE, applies a transformation to the color scale (default is FALSE).
Logical. If TRUE, adds a color legend (default is TRUE).
Base text size for theme_uplots(). Default = 12.
Logical. If TRUE, adds a UME caption.
Logical. If TRUE, return interactive plotly object.
Arguments passed on to f_colorz
zNumeric vector. Values whose colors should be computed.
col_numInteger. Number of colors in the palette (default: 100).
verboselogical; if TRUE, show progress messages.
Plot of Molecular Mass (M) vs. Number of Carbon Atoms (C)
Reemtsma, T. (2010). The carbon versus mass diagram to visualize and exploit FTICR-MS data of natural organic matter. J. Mass Spectrom., 45, 382–390. tools:::Rd_expr_doi("10.1002/jms.1722")
Other plots:
uplot_cluster(),
uplot_dbe_minus_o_freq(),
uplot_dbe_vs_c(),
uplot_freq_ma(),
uplot_freq_vs_ppm(),
uplot_hc_vs_m(),
uplot_heteroatoms(),
uplot_isotope_precision(),
uplot_kmd(),
uplot_lcms(),
uplot_ma_vs_mz(),
uplot_ms(),
uplot_n_mf_per_sample(),
uplot_pca(),
uplot_ratios(),
uplot_reproducibility(),
uplot_ri_vs_sample(),
uplot_vk()
uplot_cvm(mf_data_demo, z_var = "co_tot", logo = FALSE)
Run the code above in your browser using DataLab