grob_row: Grob Row

Description Usage Arguments Value Examples

View source: R/grob_row.R

Description

The grob-row function which helps gives the grob from the grob_layout function its shape. Encompasses grob_col within the overall grob-layout.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
grob_row(
  ...,
  p = 1,
  height = NA_real_,
  border = FALSE,
  border_aes_list = ga_list(),
  title = "",
  title_aes_list = ga_list(),
  title_p = 0.15,
  title_height = NA_real_,
  caption = "",
  caption_aes_list = ga_list(),
  caption_p = 0.15,
  caption_height = NA_real_,
  padding_p = 0.05,
  padding = NA_real_
)

Arguments

...

A series of grob_col's.

p

The numeric proportion of the given height which should be given to sub-grobs outputted in the grob-row. Defaults to 1.

Overridden if a height is supplied.

height

The numeric height of the grob-row in millimeters.

Overrides the p parameter.

border

A TRUE/FALSE argument corresponding to whether or not a border around the outputted grob-row is desired.

Defaults to FALSE.

border_aes_list

The list outputted by ga_list, which controls aesthetics of the borders.

Ignored if border is set to FALSE.

title

A character string which will be displayed as the title of the grob-row.

title_aes_list

The list outputted by ga_list, which controls aesthetics of the title of the grob-row.

title_p

The numeric proportion of height within the grob-row which will be used by the title grob.

title_height

The numeric height in mm within the grob_column which will be used by the title grob. Will override title_p if provided.

caption

A character string which will be displayed as the caption of the grob-row.

caption_aes_list

The list outputted by ga_list, which controls aesthetics of the caption of the grob-row.

caption_p

The numeric proportion of height within the grob-row which will be used by the caption grob.

caption_height

The numeric height in mm within the grob_column which will be used by the caption grob. Will override caption_p if provided.

padding_p

The proportion of the minimum of the height and width which will be used for the padding around the edge of the grob-row.

Overridden by any numeric value provided in the padding parameter.

padding

The numeric amount of padding around the edge of the grob-row in millimeters.

Overrides the padding_p parameter.

Value

An R6 class object which contains all the information needed to carry on to its grob-columns and create the grob-row.

Examples

1
2
3
4
5
grob_row(
  grob_col(1, border = TRUE),
  grob_col(2, border = TRUE)
  ) %>%
  view_grob(100, 100)

grobblR documentation built on Sept. 15, 2021, 1:07 a.m.