makeProps | R Documentation |
Append a column for a polygon property (e.g., border
or
lty
) to PolyData based on measurements in the
PolyData's Z
column.
makeProps(pdata,breaks,propName="col",propVals=1:(length(breaks)-1))
pdata |
PolyData with a |
breaks |
either a vector of cut points or a scalar denoting the
number of intervals that |
propName |
name of the new column to append to |
propVals |
vector of values to associate with |
This function acts like the cut
function to produce
PolyData suitable for the polyProps
plotting argument
(see addLabels
, addLines
,
addPoints
, addPolys
,
addStipples
, plotLines
,
plotMap
,plotPoints
, and
plotPolys
). The Z
column of pdata
is
equivalent to the data vector x
of the cut
function.
PolyData with the same columns as pdata
plus an
additional column propName
.
Nicholas M. Boers, Staff Software Engineer
Jobber, Edmonton AB
Last modified Rd: 2013-04-10
addLabels
,
addLines
,
addPoints
,
addPolys
,
addStipples
,
plotLines
,
plotMap
,
plotPoints
,
plotPolys
,
PolyData,
PolySet.
local(envir=.PBSmapEnv,expr={
#--- create a PolyData object
pd <- data.frame(PID=1:10, Z=1:10)
#--- using 3 intervals, create a column named `col' and populate it with
#--- the supplied values
makeProps(pdata=pd, breaks=3, propName="col", propVals=c(1:3))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.