plotSSN: Plotting Function for SpatialStreamNetwork Objects

Description Usage Arguments Value Author(s) Examples

View source: R/plotSSN.R

Description

Plotting Function for SpatialStreamNetwork Objects

Usage

1
2
plotSSN(x, VariableName = NULL, addFuncColName = NULL, nbrks = 8,
  strCol = "blue", strLwd = NULL, ...)

Arguments

x

an object of class SpatialStreamNetwork.

VariableName

a response variable name in the data.frame of observed data in the SpatialStreamNetwork object.

addFuncColName

the additive function column name in the data.frame of lines data in the SpatialStreamNetwork object. The size of the streams are scaled by this column. If NULL (default) all lines are are same size.

nbrks

the number of classes for coloring the predictions (or standard errors) according to their value. The default is 8.

strCol

color of the stream lines. Default is 'blue'.

strLwd

line width for streams. Ignored if addFuncColName is used.

...

other arguments passed from the points function

Value

a map of a SpatialStreamNetwork object using sp plotting functions.

Author(s)

Jay Ver Hoef

Examples

 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
SSN4 <- importSSN(system.file("lsndata/LewWillCol.ssn", 
 package = "fluvgrm"), o.write = TRUE)
# default plot with blue lines for stream segments and
# black + for data locations
plotSSN(SSN4)
# plot with response variable colored by value
plotSSN(SSN4, VariableName = 'STREAM_AUG', pch = 19, cex = 1.2,
  addFuncColName = 'afvArea', strCol = 'grey50')
# to run a script that will create Fig. 4-6 in the Zimmerman and
# Ver Hoef paper "The Torgegram for Fluvial Variography: Characterizing
# Spatial Dependence on Stream Networks" navigate to the script on your
# computer found here:
system.file("scripts/realDataFigures.R", package = "fluvgrm")
# if you run it from source,
source(system.file("scripts/realDataFigures.R", package = "fluvgrm"))
# Figures 5 and 6 are stored on the R temp directory, 
# which can be found with
tempdir()
# and you can navigate to it in your file system to see the pdfs
# that were created. Figure 5 on the raw temperature data is named 
# "FCFUtemp.pdf," and Figure 6 on the residuals is names "FCFUresid.pdf."
# The script used to access the data and create Figure 2 is the file 
# "simulationFigures.R" in the scripts folder. To see where that is 
# in your file system use:
system.file("scripts/simulationFigure.R", package = "fluvgrm")
# To run the whole script from within R use:
source(system.file("scripts/simulationFigure.R", package = "fluvgrm"))
# Figure 2 is now stored on the R temp directory, which can be found with
tempdir()
# and you can navigate to it in your file system to see the pdf that was 
# created. Figure 2 is named "FCVAvsFCSD4Fig.pdf."

jayverhoef/fluvgrm documentation built on Jan. 20, 2020, 7:54 p.m.