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()
23 lines
583 B
R
23 lines
583 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/logo.R
|
|
\name{measure_caption}
|
|
\alias{measure_caption}
|
|
\title{Measure a ggplot2 object caption}
|
|
\usage{
|
|
measure_caption(gg)
|
|
}
|
|
\arguments{
|
|
\item{gg}{a ggplot object}
|
|
}
|
|
\value{
|
|
a numeric value stating the number of lines to be added or subtracted to align a logo with
|
|
the caption
|
|
}
|
|
\description{
|
|
Measure a ggplot2 object caption
|
|
}
|
|
\examples{
|
|
p1 <- ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) + ggplot2::geom_point()
|
|
measure_caption(p1) # Should equal 1 since no caption is present
|
|
}
|