R-CMD-check / R CMD check (push) Successful in 1m45s
theme.R: - Remove deprecated legend.text.align and legend.title.align (ggplot2 3.5.0) - Remove stale @importFrom graphics plot (unused in theme function) logo.R: - Fix make_logo_grob() spurious two-row data frame (drop aes/data from canvas) - Fix add_logo_ga() caption measurement always using first plot; now uses max across all plots with captions - Fix add_logo_ga() ncol hardcoded to 2; now uses length(plot_list) - Fix add_logo_ga() widths silently ignored in nrow > 1 path; now warns - Replace deprecated qplot() in examples with ggplot() equivalents - Fix native = T -> TRUE in plot_jpeg()
22 lines
497 B
R
22 lines
497 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/logo.R
|
|
\name{has_caption}
|
|
\alias{has_caption}
|
|
\title{Test whether a ggplot2 object has a caption}
|
|
\usage{
|
|
has_caption(gg)
|
|
}
|
|
\arguments{
|
|
\item{gg}{a gg object from ggplot2}
|
|
}
|
|
\value{
|
|
a logical, TRUE if a caption exists and FALSE if it does not
|
|
}
|
|
\description{
|
|
Test whether a ggplot2 object has a caption
|
|
}
|
|
\examples{
|
|
p1 <- ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) + ggplot2::geom_point()
|
|
has_caption(p1) # FALSE
|
|
}
|