getNLinesLegend: Get number of lines in the legend,
either from directly the ggplot2 object,
or from the values of the legend (legendValues)
and title (legendTitle)
Description
Get number of lines in the legend,
either from directly the ggplot2 object,
or from the values of the legend (legendValues)
and title (legendTitle)
Usage
getNLinesLegend(gg, values, title)
Value
integer with (approximated) number of lines
Arguments
- gg
ggplot2 object
- values
Vector with unique legend values
- title
String, title for the plot.