forest_theme: Forest plot default theme

View source: R/theme.R

forest_themeR Documentation

Forest plot default theme

Description

Default theme for the forest plot, but can pass other parameters. The parameters will be passed to corresponding elements of the forest plot.

  • ci_*Control the graphical parameters of confidence intervals

  • legend_*Control the graphical parameters of legend

  • xaxis_*Control the graphical parameters of x-axis

  • refline_*Control the graphical parameters of reference line

  • vertline_*Control the graphical parameters of vertical line

  • summary_*Control the graphical parameters of diamond shaped summary CI

  • footnote_*Control the graphical parameters of footnote

  • title_*Control the graphical parameters of title

  • arrow_*Control the graphical parameters of arrow

See gpar for more details.

Usage

forest_theme(
  base_size = 12,
  base_family = "",
  ci_pch = 15,
  ci_col = "black",
  ci_alpha = 1,
  ci_fill = NULL,
  ci_lty = 1,
  ci_lwd = 1,
  ci_Theight = NULL,
  legend_name = "Group",
  legend_position = "right",
  legend_value = "",
  xaxis_lwd = 0.6,
  xaxis_cex = 1,
  refline_lwd = 1,
  refline_lty = "dashed",
  refline_col = "grey20",
  vertline_lwd = 1,
  vertline_lty = "dashed",
  vertline_col = "grey20",
  summary_col = "#4575b4",
  summary_fill = summary_col,
  footnote_cex = 0.6,
  footnote_fontface = "plain",
  footnote_col = "black",
  title_just = c("left", "right", "center"),
  title_cex = 1.2,
  title_fontface = "bold",
  title_col = "black",
  title_fontfamily = base_family,
  arrow_type = c("open", "closed"),
  arrow_label_just = c("start", "end"),
  arrow_length = 0.05,
  arrow_lwd = xaxis_lwd,
  arrow_fill = "black",
  arrow_col = arrow_fill,
  arrow_cex = xaxis_cex,
  xlab_adjust = c("refline", "center"),
  xlab_cex = 1,
  xlab_fontface = "plain",
  ...
)

Arguments

base_size

The size of text

base_family

The font family

ci_pch

Shape of the point estimation. It will be reused if the forest plot is grouped.

ci_col

Color of the CI. A vector of color should be provided for the grouped forest plot. An internal color set will be if only not.

ci_alpha

Scalar value, alpha channel for transparency of point estimation. A small vertical line will be added to indicate the point estimation if this is not equals to 1.

ci_fill

Color fill the point estimation. A vector of color should be provided for the grouped forest plot. If this is NULL (default), the value will inherit from "ci_col". This is valid only if ci_pch within 15:25.

ci_lty

Line type of the CI. A vector of line type should be provided for the grouped forest plot.

ci_lwd

Line width of the CI. A vector of line type should be provided for the grouped forest plot.

ci_Theight

A unit specifying the height of the T end of CI. If set to NULL (default), no T end will be drawn.

legend_name

Title of the legend.

legend_position

Position of the legend, "right", "top", "bottom" or "none" to suppress the legend.

legend_value

Legend labels (expressions). A vector should be provided for the grouped forest plot. A "Group 1" etc will be created if not a vector for a grouped forest plot.

xaxis_lwd

Line width for x-axis.

xaxis_cex

Multiplier applied to font size for x-axis.

refline_lwd

Line width for reference line.

refline_lty

Line type for reference line.

refline_col

Line color for the reference line.

vertline_lwd

Line width for extra vertical line. A vector can be provided for each vertical line, and the values will be recycled if no enough values are given.

vertline_lty

Line type for extra vertical line. Works same as vertline_lwd.

vertline_col

Line color for the extra vertical line. Works same as vertline_lwd.

summary_col

Color for borders of the summary diamond shape.

summary_fill

Color for filling the summary diamond shape.

footnote_cex

Multiplier applied to font size for footnote.

footnote_fontface

The font face for footnote.

footnote_col

Color of the footnote.

title_just

The justification of the title, default is 'left'.

title_cex

Multiplier applied to font size for title.

title_fontface

The font face for title, default is 'bold'.

title_col

Color of title.

title_fontfamily

Font family of title.

arrow_type

Type of the arrow below x-axis, see arrow.

arrow_label_just

The justification of the arrow label relative to arrow. Control the arrow label to align to the starting point of the arrow "start" (default) or the ending point of the arrow "end".

arrow_length

The length of the arrow head, default is 0.05. See arrow.

arrow_lwd

Line width of the arrow, same as xaxis_lwd by default.

arrow_fill

Filling color of the arrow head, default is "black".

arrow_col

Line and text color of the arrow, same as arrow_fill by default.

arrow_cex

Multiplier applied to font size for arrow label, same as xaxis_cex by default.

xlab_adjust

Control the alignment of xlab to reference line (default) or center of the x-axis.

xlab_cex

Multiplier applied to font size for xlab

xlab_fontface

The font face for xlab, default is 'bold'.

...

Other parameters passed to table. See tableGrob for details.

Value

A list.

See Also

tableGrob forest textGrob gpar arrow segmentsGrob linesGrob pointsGrob legendGrob


forestploter documentation built on Sept. 24, 2023, 1:07 a.m.