prFpDrawLegend: Draw the forestplot legend

Description Usage Arguments Value

Description

Takes the grobs and outputs the legend inside the current viewport.

Usage

1
2
prFpDrawLegend(lGrobs, legend.pos, col, colgap, legend.gp, legend.r,
  legend.padding, legendMarkerFn, ...)

Arguments

lGrobs

A list with all the grobs, see prFpGetLegendGrobs

legend.pos

Specifies if the legend is horizontal or not. Can either be a list or a string.

col

The colors of the legends.

colgap

The gap between the box and the text

legend.gp

The gpar options for the legend. If you want the background color to be light grey then use legend.gp = gpar(fill = "lightgrey"). If you want a border then set the col argument: legend.gp = gpar(fill = "lightgrey", col="black"). You can also use the lwd and lty argument as usual, legend.gp = gpar(lwd=2, lty=1), will result in a black border box of line type 1 and line width 2.

legend.r

The box can have rounded edges, check out grid.roundrect. The r option should be a unit object. This is by default unit(0, "snpc") but you can choose any value that you want. The "snpc" unit is the preferred option.

legend.padding

The padding for the legend box, only used if box is drawn. This is the distance from the border to the text/boxes of the legend.

legendMarkerFn

The function for drawing the marker

...

Passed to the legend legendMarkerFn

Value

void


raredd/Gmisc0 documentation built on May 27, 2019, 2:02 a.m.