Description Usage Arguments Value Author(s) Examples
Given a sampling design and a function to compute cost maps it generates the related map plot, based on spplot
. If no cost map function is available, it may plot it with data from related simulations
.
1 2 3 4 5 6 7 8 9 |
simulations |
|
SD |
indices of |
locationsFix |
indices of fix sensors, taken into account to compute cost map and plotted |
locationsInitial |
indices of initial sensors, for plotting |
locationsAll |
indices of all possible sensors, for plotting |
costMap |
|
zcol |
index or name: if no |
allIn1Plot |
if several SDs are given, they are by default ( |
pch |
point style of |
col |
colors for |
pointsKey |
logical, if key for points is to be printed |
mainCost |
logical, if cost of SD is to be used as main (this is only done if |
pch.SDs |
point types for the different SDs, must have length that fits number of SDs (default: use |
col.SDs |
point colours for different SDs |
cex.SDs |
point size for different SDs |
... |
further parameters to be forwarded to |
The function generates plots (main and point key missing) and returns a list of trellis
objects (including main and keys).
Kristina B. Helle, kristina.helle@uni-muenster.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | demo(radioactivePlumes_addProperties)
data(SDssa)
SDs = list(SDssa[["SD"]][[1]][1,], SDssa$report[["SD_final"]])
singleDet = replaceDefault(singleDetection,
newDefaults = list(plot = TRUE), type = "costFun.optimiseSD")[[1]]
# separate maps
plotSD1a = plotSD(
simulations = radioactivePlumes,
SD = SDs,
costMap = singleDet)
for (i in seq(along = SDs)){
plot(plotSD1a[[i]])
}
# combined map (with customised parameters for fix and initial sensors)
I = nLocations(radioactivePlumes)
set.seed(22347287) # reconstruct initial and fix sensors of SDssa
locDel3 = sample.int(I, 5)
locKeep3 = sample(setdiff(1:I, locDel3), 10)
locAll3 = c(sample(setdiff(1:I,
c(locDel3, locKeep3)), 10), locDel3)
plotSD2 = plotSD(
simulations = radioactivePlumes,
SD = SDs,
locationsAll = setdiff(1:nLocations(radioactivePlumes), c(locKeep3, locAll3)),
locationsFix = locKeep3,
locationsInitial = locDel3,
costMap = singleDet,
allIn1Plot = 2,
col = c("green", "blue", "red", "white"),
pch = c(1,2,4),
col.regions = grey.colors,
colorkey = FALSE)
# combined map (with customised parameters for different SDs)
plotSD3 = plotSD(
simulations = radioactivePlumes,
SD = SDs,
locationsFix = locKeep3,
locationsAll = setdiff(1:nLocations(radioactivePlumes), c(locKeep3, locAll3)),
allIn1Plot = 2,
col = c(1, "white", "white", "white"),
pch = c(1,20,0),
col.regions = grey.colors,
pointsKey = FALSE,
pch.SDs = 2:5,
cex.SDs = c(3.5,3,2.5,2),
col.SDs = 4:8
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.