Learn R Programming

ume (version 1.5.2)

uplot_dbe_vs_c: Plot DBE vs Carbon Atoms

Description

Creates a scatter plot of DBE (double bond equivalents) vs. number of carbon atoms. Points are color-coded by a selected variable (z_var). The plot follows the same stylistic conventions as the other uplot_* functions, including the unified theme and optional UME caption.

Usage

uplot_dbe_vs_c(
  df,
  z_var = "norm_int",
  palname = "redblue",
  col_bar = TRUE,
  tf = FALSE,
  logo = TRUE,
  gg_size = 12,
  plotly = FALSE,
  ...
)

Value

A ggplot2 object or a plotly object (if plotly = TRUE).

Arguments

df

A data.table containing columns: 12C, dbe, and the variable given in z_var.

z_var

Variable used for color coding (default "norm_int").

palname

Color palette name for f_colorz() (viridis, magma, plasma, etc.).

col_bar

Logical. If TRUE, adds a color legend (default is TRUE).

tf

Logical. If TRUE, applies a transformation to the color scale (default is FALSE).

logo

Logical. If TRUE, adds a UME caption.

gg_size

Base text size for theme_uplots(). Default = 12.

plotly

If TRUE, returns a plotly interactive plot.

...

Arguments passed on to f_colorz

z

Numeric vector. Values whose colors should be computed.

col_num

Integer. Number of colors in the palette (default: 100).

verbose

logical; if TRUE, show progress messages.

See Also

Other plots: uplot_cluster(), uplot_cvm(), uplot_dbe_minus_o_freq(), 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()

Examples

Run this code
uplot_dbe_vs_c(mf_data_demo, z_var = "norm_int")

Run the code above in your browser using DataLab