R/plot.msimat.R

Defines functions plot.msimat

Documented in plot.msimat

#' Plot method for object msimat
#'
#' Plots a graph of total intensity per mass peak
#'
#' @param d msimat; MSI imaging object created by function \code{\link{msimat}}
#' @param type What type of plot to be drawn, passed to \code{\link{plot}}
#' @param xlab Label for x axis
#' @param ylab Label for y-axis
#' @param ... Other parameters to pass to \code{plot}
#'
#' @export

plot.msimat <- function(d, type="h", xlab="m/z", ylab="Total intensity", ...) {
  plot(x=d[["peaks"]],
       y=d[["peakintensities"]],
       type=type,
       xlab=xlab,
       ylab=ylab,
       ... )
}
kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.