ggplot2
object via gg
or from the label via value
Get number of lines for specific label either
from a ggplot2
object via gg
or from the label via value
getNLinesLabel(
gg,
value,
elName = c("x", "y", "title", "caption"),
elNLines = NULL
)
integer with (approximated) number of lines
ggplot2
object
String with label value.
string with name of label to extract, among 'x', 'y' and 'title'
(optional) Named integer with number of lines, by default 2 for 'x'/'y', 3 for 'title' and 1 for caption.
Laure Cougnaud