% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.mnirs.R
\name{breaks_timespan}
\alias{breaks_timespan}
\title{Breaks for time span data}
\usage{
breaks_timespan(unit = c("secs", "mins", "hours", "days", "weeks"), n = 5)
}
\arguments{
\item{unit}{The time unit used to interpret numeric data input (\emph{defaults}
to \emph{"secs"}).}

\item{n}{Desired number of breaks. You may get slightly more or fewer breaks
than requested.}
}
\value{
Returns a function for generating breaks.
}
\description{
Pretty time span breaks for plotting in units of 5, 15, 30, 60 sec, etc.
Modified from \code{\link[scales:breaks_timespan]{scales::breaks_timespan()}}.
}
\examples{
\dontshow{if (rlang::is_installed("ggplot2")) withAutoprint(\{ # examplesIf}
x <- 0:120
y <- sin(2 * pi * x / 15) + rnorm(length(x), 0, 0.2)

ggplot2::ggplot(data.frame(x, y), ggplot2::aes(x, y)) +
    theme_mnirs() +
    ggplot2::scale_x_continuous(breaks = breaks_timespan()) +
    ggplot2::geom_line()
\dontshow{\}) # examplesIf}
}
