Learn R Programming

sampSurf (version 0.7-6)

gridCellEnhance: Add Grid Lines and Centers in Package “sampSurf”

Description

This routine is found within several of the plotting methods for objects of class "'>Tract" or it subclasses. In these methods, the arguments detailed below are passed as part of the "…" list. It can, however, also be used as a stand-alone function if desired, and applied to an existing plot of “Tract” objects, or objects that contain a “Tract” object, such as those of class "'>sampSurf". Lastly, it is used directly in plotting objects of class "'>InclusionZoneGrid" of subclasses.

Usage

gridCellEnhance(tract,
                gridLines = FALSE,
                gridCenters = FALSE,
                gridLineColor = .StemEnv$gridLineColor,
                gridCenterColor = .StemEnv$gridCenterColor,
                lwdGrid = 1, ...)

Arguments

tract

An object of class “Tract” or subclass.

gridLines

TRUE: plot grid lines; FALSE: no grid lines.

gridCenters

TRUE: plot grid cell centers; FALSE: no grid cell centers.

gridLineColor

An R color for the grid lines.

gridCenterColor

An R color for the grid cell centers.

lwdGrid

The line width specification in the form of the lwd par parameter, for the grid lines.

Arguments to be ignored at present.

Value

Invisibly.

Details

A valid plot must have been constructed first for the “Tract” object as the embellishments will be added to it. This should probably only be used on small areas, since the lines or centers will overlap for large areas or high resolution objects.

See Also

plot-methods

Examples

Run this code
# NOT RUN {
#
# apply it after plotting a sampling surface...
#
tr = Tract(c(x=50,y=50), cellSize=0.5)
btr = bufferedTract(10, tr)
ssSA = sampSurf(2, btr, iZone = 'sausageIZ', plotRadius=3,
       buttDiam=c(20,40))
plot(ssSA, axes=TRUE)
gridCellEnhance(ssSA@tract, gridLines=TRUE)

#
# on a tract only...
#
plot(btr, axes=TRUE, gridCenters=TRUE)
# }

Run the code above in your browser using DataLab