CM.plotPlanView: Plot a map of the channel

Description Usage Arguments Details Value Author(s) Examples

View source: R/CM.plotPlanView.r

Description

Create a plan view map of the channel and various elements that can be switched on and off (banks, centerline, transects, grid, legend, etc.).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
CM.plotPlanView(
  cmgo.obj,
  set = "set1",
  title = NULL,
  set.compare = NULL,
  extent = NULL,
  zoom = FALSE,
  zoom.length = NULL,
  cl = NULL,
  error = NULL,
  error.type = "errors.filter2",
  x = NULL,
  y = NULL
)

Arguments

cmgo.obj

the global object of type list containing data and parameters created with CM.ini()

set

the data set to be plotted, "set1" if not specified. See documentation of CM.ini() to learn about data sets.

title

a title printed above the plot, if not specified a title will be composed from the enabled plot elements

set.compare

a second data set to be plotted in light color for comparison

extent

a string defining the plotting extent of the map (specifying an object of the list in par$plot.zoom.extents) or NULL (the default extent of par$plot.zoom.extent is taken)

zoom

defines if plot is zoomed (TRUE) or not (FALSE). In case of NULL (default) the value of par$plot.zoom is taken

zoom.length

a number defining the zoom length

cl

the centerline point or points with should be centered

error

an integer between 1 and <number of errors> (see Details for further information)

error.type

a string specifying which errors should be investigated ("errors.filter2", "errors.filter2.first" or "errors.sort")

x

an x-coordinate where the map is centered at

y

an y-coordinate where the map is centered at

Details

CM.plotPlanView() creates a plan view plot. To specify the map extent (plot region) multiple settings exist. The map extent is the range of x and y coordinates shown on the map, speaking in R terms the xlim and ylim parameters of the plot function. In CM.plotPlanView() the map extent is defined by a center coordinate (x and one y coordinate where the plot is centered at), and a zoom length. You have multiple ways to determine the center coordinate: pre-defined extent, cl, error and direct x/y coordinates (see descriptions in the parameters). This list also represents the priority, meaning, the pre-defined extent indicates the lowest priority and x/y coordinates the highest if more than one parameter is set. The zoom length can be given via the global parameter object or directly with the parameter zoom.

You can enable/disable the following plotting elements via the paramtere object:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plot.planview               = TRUE,        # plot an plan view overview plot
plot.planview.secondary     = TRUE,        # plot a secondary channel polygon to the plot (for comparison of data sets)
plot.planview.bank.points   = TRUE,        # plot channel bank points
plot.planview.polygon       = TRUE,        # plot channel bank polygon
plot.planview.voronoi       = TRUE,        # plot voronoi polygons in plan view plot
plot.planview.cl.original   = FALSE,       # plot centerline in plan view plot
plot.planview.cl.smoothed   = TRUE,        # plot centerline in plan view plot
plot.planview.cl.tx         = FALSE,       # plot a label next to the centerline points
plot.planview.transects     = FALSE,       # plot transects
plot.planview.transects.len = 20,          # the length of transects
plot.planview.dist2banks    = TRUE,        # plot transect segments from bank to bank
plot.planview.grid          = TRUE,        # plot a grid in the background of the plan view plot
plot.planview.grid.dist     = 20,          # the distance of the grid lines
plot.planview.legend        = TRUE,        # plot a legend
plot.planview.scalebar      = TRUE,        # plot a scalebar

Value

a list of applied plot parameters (this is useful for plotting the same extent in CM.plotMetrics())

Author(s)

Antonius Golly

Examples

1
2
3
4
5
# get demo data (find instructions on how to use own data in the documentation of CM.ini())
cmgo.obj = CM.ini("demo2")

# example 1: overview plot
CM.plotPlanView(cmgo.obj)

AntoniusGolly/cmgo documentation built on April 16, 2021, 2:52 p.m.