To prevent overlap with panel borders or axis lines, annotations are clipped to a viewport that is reduced in size by the width of these lines. They depend on the current plot theme.
get_padding_from_elements(
gg_plot,
elements_t,
elements_r,
elements_b,
elements_l
)A vector grid::units of paddings for t, r, b, l (in pt)
A ggplot2 object.
character vector with names of elements to consider for padding at the top
character vector with names of elements to consider for padding on the right
character vector with names of elements to consider for padding at the bottom
character vector with names of elements to consider for padding on the left
uninfinite_coord for construction of the complete
replaced coordinate.