Learn R Programming

forestplot (version 1.0)

prFpDrawLegend: Draw the forestplot legend

Description

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

Usage

prFpDrawLegend(lGrobs, col, colgap, pos, gp, r, padding, fn.legend, ...)

Arguments

lGrobs
A list with all the grobs, see prFpGetLegendGrobs
col
The colors of the legends.
colgap
The gap between the box and the text
pos
The position of the legend, either at the "top" or the "right" unlesss positioned inside the plot. If you want the legend to be positioned inside the plot then you have to provide a list with the same x & y qualities as
gp
The gpar options for the legend. If you want the background color to be light grey then use gp = gpar(fill = "lightgrey"). If you want a border then set the col argument: gp =
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")
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.
fn.legend
The function for drawing the marker
...
Passed to the legend fn.legend

Value

  • void