Description Usage Arguments Value Examples
SOleg creating rounded legends for SOmap
1 2 3 4 |
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 |
Creates rounded legends
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.