diff --git a/R/plot_aagi.R b/R/plot_aagi.R index 3cf2933..df97258 100644 --- a/R/plot_aagi.R +++ b/R/plot_aagi.R @@ -3,25 +3,7 @@ #' @description Basic X-Y plotting that follows \acronym{AAGI} colour and #' typography guidelines that uses (hopefully) sensible defaults. #' -#' @param x Values to be plotted on x-axis. -#' @param y Values to be used on y-axis. Optional. -#' @param main Main title text. -#' @param sub Subtitle text below x-axis label. -#' @param xlab X-axis label. Optional, if blank will default to data supplied -#' label. -#' @param ylab Y-axis label. Optional, if blank will default to data supplied -#' label if one is available. -#' @param xlim Numeric value for x-axis limits. Optional. -#' @param ylim Numeric value for y-axis limits. Optional. -#' @param col Colour to use for points Defaults to "AAGI Black", a very dark -#' grey. Can be supplied as a named AAGI colour; *e.g.*, "AAGI Black"; -#' a named colour, "black"; or a hexadecimal code, "#414042". -#' @param pch plotting ‘character’, \emph{i.e.}, symbol to use. This can either -#' be a single character or an integer code for one of a set of graphics -#' symbols. The full set of S symbols is available with `pch = 0:18`, see the -#' examples below. (NB: \R uses circles instead of the octagons used in S.) -#' @param type What type of plot should be drawn. Defaults to `p` for -#' **p**oints`` See Section "Type" for more. +#' @inheritParams graphics::plot #' @param ... Arguments to be passed to methods, such as graphical parameters #' (see [graphics::par()]). The most commonly used argument would be #' `type` what type of plot should be drawn. @@ -68,6 +50,7 @@ #' plot_aagi <- function(x, col = NULL, + pch = 16, ...) { if (is.null(col)) { @@ -79,6 +62,6 @@ plot_aagi <- function(x, withr::local_par(.new = par_aagi()) showtext::showtext_begin() - graphics::plot(x, col = col2, ...) + graphics::plot(x, col = col2, pch = pch, ...) showtext::showtext_end() } diff --git a/man/plot_aagi.Rd b/man/plot_aagi.Rd index 371f683..04f3d70 100644 --- a/man/plot_aagi.Rd +++ b/man/plot_aagi.Rd @@ -4,52 +4,9 @@ \alias{plot_aagi} \title{Basic X-Y Plotting Using a Unified AAGI Style and Typography} \usage{ -plot_aagi( - x, - y = NULL, - type = "p", - xlim = NULL, - ylim = NULL, - main = NULL, - sub = NULL, - xlab = NULL, - ylab = NULL, - col = "AAGI Black", - pch = 16, - ... -) +plot_aagi(x, col = NULL, pch = 16, ...) } \arguments{ -\item{x}{Values to be plotted on x-axis.} - -\item{y}{Values to be used on y-axis. Optional.} - -\item{type}{What type of plot should be drawn. Defaults to \code{p} for -\strong{p}oints`` See Section "Type" for more.} - -\item{xlim}{Numeric value for x-axis limits. Optional.} - -\item{ylim}{Numeric value for y-axis limits. Optional.} - -\item{main}{Main title text.} - -\item{sub}{Subtitle text below x-axis label.} - -\item{xlab}{X-axis label. Optional, if blank will default to data supplied -label.} - -\item{ylab}{Y-axis label. Optional, if blank will default to data supplied -label if one is available.} - -\item{col}{Colour to use for points Defaults to "AAGI Black", a very dark -grey. Can be supplied as a named AAGI colour; \emph{e.g.}, "AAGI Black"; -a named colour, "black"; or a hexadecimal code, "#414042".} - -\item{pch}{plotting ‘character’, \emph{i.e.}, symbol to use. This can either -be a single character or an integer code for one of a set of graphics -symbols. The full set of S symbols is available with \code{pch = 0:18}, see the -examples below. (NB: \R uses circles instead of the octagons used in S.)} - \item{...}{Arguments to be passed to methods, such as graphical parameters (see \code{\link[graphics:par]{graphics::par()}}). The most commonly used argument would be \code{type} what type of plot should be drawn.}