% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rglactions.R
\name{limit_fun_na}
\alias{limit_fun_na}
\title{Get data limiting function to NA.}
\usage{
limit_fun_na(vmin, vmax)
}
\arguments{
\item{vmin}{numerical scalar, the lower border. Data values below this will be set to \code{NA} in the return value.}

\item{vmax}{numerical scalar, the upper border. Data values above this will be set to \code{NA} in the return value.}
}
\value{
a function that takes as argument the data, and clips it to the requested range. I.e., values outside the range will be set to \code{NA}. Designed to be used as \code{rglactions$trans_fun} in vis functions, to limit the colorbar and data range.
}
\description{
Get data limiting function to use in \code{\link{rglactions}} as 'trans_fun' to transform data. This is typically used to limit the colorbar in a plot to a certain range. This is similar to \code{\link{clip.data}}, but uses absolute values instead of percentiles to clip.
}
\note{
This is useful for thresholding stuff like t-value maps. All values outside the range will be displayed as the background color.
}
\examples{
   rglactions = list("trans_fun"=limit_fun_na(2,3));

}
\seealso{
\code{\link{limit_fun_na_inside}} which will set the values inside the range to \code{NA}.
}
