laser_map: Laser Maps Plot

View source: R/laser_map.R

laser_mapR Documentation

Laser Maps Plot

Description

Function that creates laser maps of selected elements. The function creates a list containing the individual laser plots. The list can than used to plot all the maps at once via ggpubr::ggarrange or individual plots can be plotted by selecting single elements out of the list.

Usage

laser_map(
  data,
  selected_elements,
  Log_Trans = FALSE,
  pca_rec = NA,
  sel_pc = NA,
  unit_title = "(ppm)",
  fontsize = 14,
  font = "serif",
  labels = scales::label_scientific(),
  ...
)

Arguments

data

Laser map data frame. If PCA are plotted the PC columns must be merged with the laser map data frame.

selected_elements

Vector containing the selected elements and PC's will be plotted.

Log_Trans

Data set containing a column called "Log" which indicates if a map should be log transformed. If not specified all elements are log transformed.

sel_pc

Selecting the principal components from the pcobj to calculate the explained variance shown by the laser map.

unit_title

Specify the unit of the laser map for the plot title as a string. Has no effect on the values.

fontsize

Fontsize used in the plot.

font

Font type, options are "serif", "sans" and "mono".

labels

Argument for the scale notation. See ?scales:: for more information.

...

Options for viridis color scale. Includes "A", "B", "C", "D". See ?ggplot2::scale_fill_viridis for more information.

pcobj

PCA object created by stats::prcomp.


muhohl/geochem documentation built on March 4, 2025, 8:14 p.m.