usrBox: Draw colored box indicating R plot space

usrBoxR Documentation

Draw colored box indicating R plot space

Description

Draw colored box indicating the active R plot space

Usage

usrBox(
  fill = "#FFFF9966",
  label = NULL,
  parUsr = par("usr"),
  debug = FALSE,
  add = FALSE,
  ...
)

Arguments

fill

character R color used to fill the background of the plot

label

character text optionally used to label the center of the plot space.

parUsr

numeric vector length 4, indicating the R plot space, consistent with par("usr"). It can thus be used to define a different area, though using the rect function directly seems more appropriate.

debug

logical whether to print the parUsr value being used.

Details

This function simply draws a box indicating the active plot space, and by default it shades the box light yellow with transparency. It can be useful to indicate the active plot area while allowing pre-drawn plot elements to be shown, or can be useful precursor to provide a colored background for the plot.

The plot space is defined using par("usr") and therefore requires an active R device is already opened.

See Also

Other jam plot functions: adjustAxisLabelMargins(), coordPresets(), decideMfrow(), drawLabels(), getPlotAspect(), groupedAxis(), imageByColors(), imageDefault(), minorLogTicksAxis(), nullPlot(), plotPolygonDensity(), plotRidges(), plotSmoothScatter(), shadowText_options(), shadowText(), showColors(), smoothScatterJam(), sqrtAxis()

Examples

# usrBox() requires that a plot device is already open
nullPlot(doBoxes=FALSE);
usrBox();


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.