SOleg: SOleg creating rounded legends for SOmap

Description Usage Arguments Value Examples

Description

SOleg creating rounded legends for SOmap

Usage

1
2
3
4
SOleg(x = NULL, position = "topright", col = NULL, ticks = NULL,
  tlabs = NULL, breaks = NULL, Trim = -45, type = "discrete",
  label = "", ladj = 0.5, lsrt = 0, lcex = 0.75, tadj = 0.5,
  tcex = 1, rnd = NULL, borderwidth = 2)

Arguments

x

Object to obtain min and max values from for type='continuous' default=NULL

position

Where you want the legend ("topleft","topright", "bottomright")

col

Color pattern to use.

ticks

Number of ticks to include on the legend. Only used with type='continuous'

tlabs

Tick labels. Needed for type='discrete' optonal for type='continuous' if x is given

breaks

Numeric vector to create legend ticks for type='continuous' if x is given eg breaks<-c(1,2,3)

Trim

Trim that was used to create the SOmap.

type

Type of legend to be plotted 'discrete' or 'continuous' default='discrete'

label

Legend label.

ladj

Distance to adjust the tick labels from the ticks. default = 0.5

lsrt

Angle of the tick labels. default = 0

lcex

Size of the tick labels. default = 0.75

tadj

Distance to adjust the title from the ticks. default = 0.5

tcex

Size of the title text. default=1

rnd

optional rounding factor for continuous legends using the round() function. default = NULL.

borderwidth

numeric: thickness (in degrees of latitude) of the border

Value

Creates rounded legends

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
## Not run: 
SOmap()
#Discrete Legend

SOleg(position="topleft",
      col=viridis::viridis(5),
      tlabs = c("a","b","c","d", "e"),
      Trim=-45,
      label="Species")

#Continuous Legend

nums<-runif(100)

brks<-c(0.1,0.2,0.5,0.9)

SOleg(x=nums,
      position="topright",
      col=viridis::viridis(80),
      breaks=brks
      Trim=-45,
      label="Species"
      rnd=1,
      type="continuous")

## End(Not run)

mdsumner/NOmap documentation built on May 13, 2019, 11:26 a.m.