edit_plot: Edit forest plot

View source: R/edit_plot.R

edit_plotR Documentation

Edit forest plot

Description

This function is used to edit the graphical parameter of text and background of the forest plot.

Usage

edit_plot(
  plot,
  row = NULL,
  col = NULL,
  part = c("body", "header"),
  which = c("text", "background", "ci"),
  gp = gpar(),
  ...
)

Arguments

plot

A forest plot object.

row

A numeric value or vector indicating row number to edit in the dataset. Will edit the whole row if left blank for the body. This will be ignored if the part is "header".

col

A numeric value or vector indicating column to edit in the dataset. Will edit the whole column if left blank.

part

Part to edit, "body" (default) or "header".

which

Which element to edit, "text", "background" or "ci" (confidence interval). This will not edit diamond shaped summary CI, please change it with forest_theme. Also, change in ci will not have any impact on the legend.

gp

Pass gpar parameters, see gpar. It should be passed as gpar(col = "red"). For which = "ci", please refer to forest_theme ci_* parameters for the editable elements.

...

Other parameters to be passed to the grobs. For the "text", please see textGrob for details and rectGrob for "background". This will be ignored if which = "ci" as changing parameters for the confidence interval are not allowed except for the graphical parameters.

Value

A gtable object.

See Also

gpar editGrob forest_theme textGrob rectGrob


forestploter documentation built on May 29, 2024, 5:48 a.m.