Creates a scatter plot of the hydrogen-to-carbon ratio (H/C) versus molecular
mass (nm). Points are color-coded according to a selected intensity or
property column (int_col). This visualization follows the conceptual design
in Schmitt-Kopplin et al. (2010).
The function can optionally add a branding label ("UltraMassExplorer") and can optionally return an interactive Plotly version of the plot.
uplot_hc_vs_m(
df,
int_col = "norm_int",
palname = "redblue",
size_dots = 1.2,
gg_size = 12,
logo = TRUE,
plotly = FALSE,
...
)A ggplot2 scatter plot, or a plotly object if plotly = TRUE.
A data.table containing columns:
nm: molecular mass
hc: hydrogen-to-carbon ratio
int_col: the column used for color-coding
Character, column used for color-coding. Default "norm_int".
Character, palette name passed to f_colorz().
Numeric. Size of the dots in the plot (default = 0.5).
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.
tfLogical. If TRUE, applies a transformation to the color scale (default is FALSE).
Other plots:
uplot_cluster(),
uplot_cvm(),
uplot_dbe_minus_o_freq(),
uplot_dbe_vs_c(),
uplot_freq_ma(),
uplot_freq_vs_ppm(),
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_hc_vs_m(mf_data_demo, int_col = "norm_int")
Run the code above in your browser using DataLab