plotMapOptions: Graphical options for plotMap

Description Usage Arguments Value Examples

Description

These functions get and set options that control some graphical aspects of maps created with plotMap.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plotMapOptions(areaDefaultCol = "#DDDDE5", areaDefaultSize = 30,
  areaMaxSize = 50, areaMaxHeight = 50, areaChartColors = NULL,
  areaColorScaleOpts = colorScaleOptions(), labelMinSize = 8,
  labelMaxSize = 24, linkDefaultCol = "#BEBECE", linkDefaultSize = 3,
  linkMaxSize = 15, linkColorScaleOpts = colorScaleOptions(),
  legend = c("choose", "visible", "hidden"), tilesURL = defaultTilesURL(),
  preprocess = function(map) {     map })

defaultTilesURL()

colorScaleOptions(breaks = 5, domain = NULL, negCol = "#FF0000",
  zeroCol = "#FAFAFA", posCol = "#0000FF", naCol = "#EEEEEE",
  zeroTol = NULL, colors = NULL, levels = NULL)

Arguments

areaDefaultCol

default color of areas.

areaDefaultSize

default size of areas.

areaMaxSize

maximal size of an area when it represents the value of some variable.

areaMaxHeight

Maximal height of bars. Used only if a barchart representation is used.

areaChartColors

Vector of colors to use in polar area charts and bar charts

areaColorScaleOpts

List of options used to construct a continuous color scale. This list should be generated with function colorScaleOptions.

labelMinSize

minimal height of labels.

labelMaxSize

maximal height of labels.

linkDefaultCol

Default color of links.

linkDefaultSize

Default line width of links.

linkMaxSize

Maximal line width of a link when it represents the value of some variable.

linkColorScaleOpts

List of options used to construct a continuous color scale. This list should be generated with function colorScaleOptions.

legend

Should the legend be displayed or not ? Default is to mask the legend but add a button to display it. Other values are "visible" to make the legend always visible and "hidden" to mask it.

tilesURL

URL template used to get map tiles. The followign site provides some URLs; https://leaflet-extras.github.io/leaflet-providers/preview/

preprocess

A function that takes as argument a map and that returns a modified version of this map. This parameter can be used to add extra information on a map.

breaks

Either a single number indicating the approximate number of colors to use, or a vector of values at which values to change color. In the first case, the function tries to cut the data nicely, so the real number of colors used may vary.

domain

Range of the data, ie. the range of possible values. If NULL, the the range of the data is used

negCol

color of the extreme negative value.

zeroCol

color of the 0 value.

posCol

Color of the extreme positive value.

naCol

Color for missing values

zeroTol

All values in the interval \[-zeroTol, +zeroTol\] are mapped to the zeroCol color. If NULL, the function tries to pick a nice value that is approximately equal to 1% of the maximal value.

colors

Vector of colors. If it is set and if user manually sets break points, then these colors are used instead of the colors defined by parameters negCol, zeroCol and posCol.

levels

Vector of the distinct values a variable can take. Only used when the variable to represent is a categorical variable.

Value

A list with the values of the different graphical parameters.

Examples

1
2
3
4
5
## Not run: 
params <- plotMapOptions(areaDefaultCol = "red", linkDefaultCol = "orange")
plotMap(mydata, mylayout, options = params)

## End(Not run)

rte-antares-rpackage/bpN documentation built on May 31, 2019, 2:52 p.m.