This function provides easy plotting for mass and ratio traces from IRMSs scan data. It can be called either directly with a set of iso_file objects, or with a data frame prepared for plotting scan data (see iso_prepare_scan_plot_data).

iso_plot_scan_data(...)

# S3 method for iso_file_list
iso_plot_scan_data(
  iso_files,
  data = character(),
  type,
  filter = NULL,
  x_interval = c(),
  y_interval = c(),
  panel = file_id,
  color = data,
  linetype = NULL,
  label = data,
  ...
)

# S3 method for data.frame
iso_plot_scan_data(
  df,
  type,
  x_interval = c(),
  y_interval = c(),
  panel = file_id,
  color = data,
  linetype = NULL,
  label = data,
  ...
)

Arguments

...

additional parameters passed on to iso_plot_data

iso_files

collection of iso_file objects

data

which masses and ratios to plot (e.g. c("44", "45", "45/44") - without the units), if omitted, all available masses and ratios are plotted. Note that ratios should be calculated using iso_calculate_ratios prior to plotting.

type

which type of scan data to plot. Only required if there are more than one type of scan data.

filter

any filter condition to apply to the data beyond the masses/ratio selection (param data). For details on the available data columns see iso_get_raw_data with parameters gather = TRUE and include_file_info = everything() (i.e. all file info is available for plotting aesthetics).

x_interval

optional constraints on x axis values

y_interval

optional constraints on y axis values

panel

whether to panel the data by anything. If using a single parameter (e.g. panel = panel), will generate a facet_wrap. If using a formula (e.g. panel = panel ~ . or panel = file_id ~ panel), will generate a facet_grid. The default for this parameter is to panel via facet grid by the y variable name but only if multiple y columns are provided. Otherwise will not generate any facets. If additional facet parameters are desired, please leave use facet_wrap and facet_grid diretly.

color

variable to use for color aesthetic for the plot or constant value for the point and line color

linetype

variable to use for linetype aesthetic for the plot or constant value for the line type

label

this is primarily of use for turning the generated ggplots into interactive plots via ggplotly as the label will be rendered as an additional mousover label.

df

a data frame of the scan data prepared for plotting (see iso_prepare_scan_plot_data)

See also