Plot-internal: Internal functions used by 'Plot'

.preparePlotGrobR Documentation

Internal functions used by Plot

Description

Extract colours, legends and other things from object, and convert to a plotGrob.

Usage

.preparePlotGrob(
  grobToPlot,
  sGrob,
  takeFromPlotObj,
  arr,
  newArr,
  prevMinMax,
  quickPlotGrobCounter,
  subPlots,
  cols
)

.xyAxes(sGrob, arr, whPlotFrame)

## S4 method for signature '.quickPlotGrob,.arrangement'
.xyAxes(sGrob, arr, whPlotFrame)

.Plot(
  sGrob,
  grobToPlot,
  subPlots,
  quickSubPlots,
  quickPlotGrobCounter,
  isBaseSubPlot,
  isNewPlot,
  isReplot,
  zMat,
  wipe,
  xyAxes,
  legendText,
  vps,
  nonPlotArgs,
  arr
)

## S4 method for signature '.quickPlotGrob'
.Plot(
  sGrob,
  grobToPlot,
  subPlots,
  quickSubPlots,
  quickPlotGrobCounter,
  isBaseSubPlot,
  isNewPlot,
  isReplot,
  zMat,
  wipe,
  xyAxes,
  legendText,
  vps,
  nonPlotArgs,
  arr
)

.refreshGrob(
  sGrob,
  subPlots,
  legendRange,
  grobToPlot,
  plotArgs,
  nColumns,
  nRows,
  whPlotObj,
  whExistingObj
)

## S4 method for signature '.quickPlotGrob'
.refreshGrob(
  sGrob,
  subPlots,
  legendRange,
  grobToPlot,
  plotArgs,
  nColumns,
  nRows,
  whPlotObj,
  whExistingObj
)

.updateGrobGPTextAxis(sGrob, arr, newArr)

## S4 method for signature '.quickPlotGrob'
.updateGrobGPTextAxis(sGrob, arr, newArr)

Arguments

grobToPlot

Graphical object to plot

sGrob

quickPlotGrob object

takeFromPlotObj

Logical indicating whether data for grobToPlot should be found in current call to Plot or from disk

arr

An arragement object.

newArr

Logical, whether there is a new arrangement happening

quickPlotGrobCounter

Numeric. A counter. No meaning outside Plot function.

subPlots

Character. Name of plot area.

cols

Colour vector.

whPlotFrame

Numeric. Which plot within the quickPlotGrobPlots object.

quickSubPlots

List of many quickPlotGrobs

isBaseSubPlot

Logical. Is the currently being plotted object a base layer

isNewPlot

Logical. Is the currently being plotted object a new, additional plot

isReplot

Logical. Is the currently being plotted object a replot due to something like a rearrangement

zMat

List resulting from .preparePlotGrob

wipe

Logical. Is the currently being plotted object require a white rectangle to be plotted first, and subsequent other changes.

xyAxes

List of length 2, resulting from .xyAxes

legendText

Character vector of legend value labels. Defaults to NULL, which results in a pretty numeric representation. If ⁠Raster*⁠ has a Raster Attribute Table (rat; see raster package), this will be used by default. Currently, only a single vector is accepted. The length of this must match the length of the legend, so this is mostly useful for discrete-valued rasters.

vps

A viewport tree resulting from .makeViewports

nonPlotArgs

Arguments passed to Plot that are not .quickPlottables, but are passed along with .quickPlottables.

legendRange

Numeric vector giving values that, representing the lower and upper bounds of a legend (i.e., 1:10 or c(1,10) will give same result) that will override the data bounds contained within the grobToPlot.

plotArgs

list. Any arguments that the the grid package can accept for the specific grob types, e.g., rasterGrob, polygonGrob, etc.

nColumns

Numeric, length 1, indicating how many columns are in the device arrangement

nRows

Numeric, length 1, indicating how many rows are in the device arrangement

whPlotObj

Numeric. Length 1, indicating which of the currently objects passed into Plot is currently being plotted, i.e., a counter of sorts.

whExistingObj

Numeric. Like whPlotObj, but for whole existing plot, not just supplied in current call.

Author(s)

Eliot McIntire


PredictiveEcology/quickPlot documentation built on July 8, 2023, 1:29 a.m.