Learn R Programming

ume (version 1.5.2)

uplot_dbe_vs_o: Plot DBE vs Oxygen Atoms (cf. Herzsprung et al. 2014) with Option for Interactive Plot

Description

This function generates a scatter plot of Double Bond Equivalent (DBE) versus the number of oxygen atoms (o). It allows for optional customization of colors based on a specified variable (z_var) and offers the option to convert the plot to an interactive plotly object.

Usage

uplot_dbe_vs_o(
  df,
  z_var = "norm_int",
  palname = "redblue",
  col_bar = TRUE,
  tf = FALSE,
  logo = TRUE,
  cex.axis = 12,
  cex.lab = 15,
  plotly = FALSE,
  ...
)

Value

A ggplot object or a plotly object depending on the plotly argument.

Arguments

df

A data frame containing the data. The columns 16O (number of oxygen atoms), dbe (DBE values), and the column specified in z_var should be present in the data.

z_var

Character. Column name for variable used for color-coding. Content of column should be numeric.

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.

cex.axis

Numeric. Size of axis text (default is 1).

cex.lab

Numeric. Size of axis labels (default is 1.4).

plotly

Logical. If TRUE, return interactive plotly object.

...

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.