% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions-utils.R
\name{plotMsData}
\alias{plotMsData}
\title{DEPRECATED: Create a plot that combines a XIC and a mz/rt 2D plot for one sample}
\usage{
plotMsData(x, main = "", cex = 1, mfrow = c(2, 1),
  grid.color = "lightgrey",
  colramp = colorRampPalette(rev(brewer.pal(9, "YlGnBu"))))
}
\arguments{
\item{x}{\code{data.frame} such as returned by the \code{\link[=extractMsData]{extractMsData()}} function.
Only a single \code{data.frame} is supported.}

\item{main}{\code{character(1)} specifying the title.}

\item{cex}{\code{numeric(1)} defining the size of points. Passed directly to the
\code{plot} function.}

\item{mfrow}{\code{numeric(2)} defining the plot layout. This will be passed
directly to \code{par(mfrow = mfrow)}. See \code{par} for more information. Setting
\code{mfrow = NULL} avoids calling \code{par(mfrow = mfrow)} hence allowing to
pre-define the plot layout.}

\item{grid.color}{a color definition for the grid line (or \code{NA} to skip
creating them).}

\item{colramp}{a \emph{color ramp palette} to be used to color the data points
based on their intensity. See argument \code{col.regions} in
\link[lattice:level.colors]{lattice::level.colors} documentation.}
}
\description{
\strong{UPDATE}: please use \code{plot(x, type = "XIC")} from the \code{MSnbase} package
instead. See examples below.

The \code{plotMsData} creates a plot that combines an (base peak )
extracted ion chromatogram on top (rt against intensity) and a plot of
rt against m/z values at the bottom.
}
\examples{

## Read two files from the faahKO package
library(faahKO)
library(magrittr)
cdfs <- dir(system.file("cdf", package = "faahKO"), full.names = TRUE,
    recursive = TRUE)[1:2]
raw_data <- readMSData(cdfs, mode = "onDisk")

## Subset the object to a rt and mz range and plot the data.
raw_data \%>\%
    filterRt(rt = c(2700, 2900)) \%>\%
    filterMz(mz = c(334.9, 335.1)) \%>\%
    plot(type = "XIC")
}
\author{
Johannes Rainer
}
