textgrid: Add matrix of scaled text to a plot

Description Usage Arguments Details Value Author(s)

View source: R/plotutils.R

Description

Draws the strings given in a dataframe or matrix, with a font size scaled to ensure the text fits inside a specified region.

Usage

1
2
3
textgrid(tmat, x0 = 0, y0 = 0, x1 = x0 + 1, y1 = y0 + 1, xalign = "l",
xjust = 0.5, yjust = 0, colsep = 3, rowsep = 1, include.rownames,
include.colnames, draw = TRUE)

Arguments

tmat

dataframe or matrix of character strings

x0

coordinate of left edge of region

y0

coordinate of bottom edge of region

x1

coordinate of right edge of region

y1

coordinate of top edge of region

xalign

character vector of ‘l’, ‘c’, or ‘r’ specifying alignment of text within columns

xjust

justification within x0-x1

yjust

justification within y0-y1

colsep

width (in multiples of width of M) of space between columns

rowsep

height (in multiples of height of M) of space between rows

include.rownames

whether to draw rownames of tmat

include.colnames

whether to draw colnames of tmat

draw

logical vector

Details

To be written

Value

Returns a list with the following elements. cex provides the character scaling used. xpos provides the coordinates for the left edge of each column. ypos provides the coordinates for the top of each row.

Draws the contents of tmat as a side effect.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com


tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.