max_text_width: Maximum Width of Text

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/utils.R

Description

Maximum Width of Text

Usage

1
max_text_width(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 width of a list of textGrob objects.

Note it ignores the text rotation.

Value

A unit object which is in "mm".

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

max_text_height calculates the maximum height of a text vector.

Examples

1
2
x = c("a", "bb", "ccc")
max_text_width(x, gp = gpar(fontsize = 10))

ComplexHeatmap documentation built on Nov. 14, 2020, 2:01 a.m.