Maximum Height of Text

max_text_height(text, gp = gpar(), rot = 0)

Arguments

text

A vector of text.

gp

Graphic parameters for text.

rot

Rotation of the text, scalar.

Details

It simply calculates maximum height of a list of textGrob objects.

Note it ignores the text rotation.

Value

A unit object.

See also

max_text_width calculates the maximum width of a text vector.

Examples

x = c("a", "b\nb", "c\nc\nc") max_text_height(x, gp = gpar(fontsize = 10))
#> [1] 12.6929444444444mm