get_table_extra_dimensions: Get width and height of the plot.

Description Usage Arguments Value Author(s)

View source: R/draw_table_extra.R

Description

Compute the width and height in user-specified unit required for drawing the plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get_table_extra_dimensions(
  dscale,
  dcolor,
  theme,
  rows_more = NULL,
  cols_more = NULL,
  unit = "inches",
  dscale_title_legend = NULL,
  dcolor_title_legend = NULL,
  margin_x = unit(1, "inches"),
  margin_y = unit(1, "inches")
)

Arguments

dscale

a matrix containing the values defining the grobs scales.

dcolor

(optional) a matrix of size (n,m) containing the values defining the grobs colors.

theme

a list of theme parameters. Use an instance of ttheme_awesome.

rows_more

(optional) a named list of additional columns (right-part) of the plot for describing the rows. The list names will be used as column headers.

cols_more

(optional) a named list of additional rows (top-part) of the plot for describing the columns The list names will be used as row headers.

unit

(optional) choose any unit that is valid for grid::unit.

dscale_title_legend

(optional) title for the colorbar providing a legend for scales.

dcolor_title_legend

(optional) title for the colorbar providing a legend for colors

margin_x

(optional) use it to fine-tune the width of the plot if some elements are not displayed correctly.

margin_y

(optional) use it to fine-tune the height of the plot if some elements are not displayed correctly.

Value

a list with dimensions of the global plot and of parts of the plot.

Author(s)

Yoann Pradat


tableExtra documentation built on Oct. 29, 2021, 5:06 p.m.