% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_pubs.R
\name{plot_pubs}
\alias{plot_pubs}
\title{Plot Annual Publication Counts}
\usage{
plot_pubs(
  pubs = inlpubs::pubs,
  author_id = NULL,
  full_range = TRUE,
  legend_loc = "topleft",
  colors = c(USGS = "#4682B4", `Non-USGS` = "#B47846"),
  ...
)
}
\arguments{
\item{pubs}{'pub' data frame.
Publications of the INLPO; see the \code{\link{pubs}} dataset for the expected data
format. Defaults to \code{inlpubs::pubs}.}

\item{author_id}{'character' vector, or \code{NULL}.
One or more author identifiers used to subset \code{pubs} to publications that
any of those authors appear on before plotting. The default (\code{NULL})
includes all publications (no author filtering).}

\item{full_range}{'logical' flag.
Whether the x-axis spans the year range of all publications in \code{pubs}
(before any author filtering). If \code{TRUE} (the default), the timeline is
fixed to the full dataset, making per-author charts directly comparable.
If \code{FALSE}, the timeline is limited to the year range of the filtered
publications. Has no effect when \code{author_id} is \code{NULL}.}

\item{legend_loc}{'character' string.
Position of the legend, passed as the keyword location to
\code{\link[graphics:legend]{graphics::legend()}}. One of \code{"topleft"} (the default), \code{"topright"},
\code{"bottomleft"}, \code{"bottomright"}, \code{"top"}, \code{"bottom"}, \code{"left"},
\code{"right"}, or \code{"center"}.}

\item{colors}{'character' vector of length 2.
Fill colors for the two series, in the order \code{c("USGS", "Non-USGS")}.
Defaults to steel blue and burnt orange.}

\item{...}{Additional arguments passed to \code{\link[graphics:barplot]{graphics::barplot()}}.}
}
\value{
Invisibly returns a numeric vector giving the x-axis coordinates of
the bar midpoints, as returned by \code{\link[graphics:barplot]{graphics::barplot()}}.
}
\description{
Draw a stacked bar chart of INLPO publication counts by year,
with USGS and non-USGS publications distinguished by color.
}
\examples{
plot_pubs()
}
\seealso{
\code{\link{pubs}} for the publications dataset.
}
\author{
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
}
