subplot: Sub-community plot under each sub-environmental space K

Description Usage Arguments Examples

View source: R/subplot.R

Description

The function to represent the community subniche position under each subenvironment K with their respective marginality from G_K.

Usage

1
2
3
4
5
6
subplot(subnic, main=NULL, xlab=NULL, ylab=NULL, col.axis="azure3", lty.axis=2,
       lwd.axis=2, col.sublab="black", font.sublab=2, cex.sublab=0.7, show.lines=F,
       border.E="#92c5de", col.E="#92c5de", lty.E=1, lwd.E=1, border.K ="#2c7fb8",
       col.K ="#2c7fb8", lty.K=1, lwd.K=1, col.arrow="black", angle.arrow=20, lwd.arrow=2,
       length.arrow=0.1, col.G_k= "#b35806", cex.G_k=0.5, pch.G_k=19,
       col.su="#b35806", cex.su=0.5, pch.su=1, posi.leg="topleft", bty.leg="n", ...)

Arguments

subnic

an object of class subniche.

main

a main title for the plot, see title for more details.

xlab

a label for the x axis, defaults to a description of x, see title for more details.

ylab

a label for the y axis, defaults to a description of y, see title for more details.

col.axis

axis color, see par for more details.

lty.axis

axis line type, see par for more details.

lwd.axis

axis width, see par for more details.

col.sublab

color of the species labels, see textplot for more details.

font.sublab

font of the species labels, see textplot for more details.

cex.sublab

size of the species labels, see textplot for more details.

show.lines

if true, then lines are plotted between x,y and the word, for those words not covering their x,y coordinates. See textplot for more details.

border.E

color border of E polygon, see polygon for more details.

col.E

inside color of E polygon, see polygon for more details.

lty.E

line type for the E border, see polygon for more details.

lwd.E

line width for the E border, see polygon for more details.

border.K

color border of K polygon, see polygon for more details.

col.K

inside color of K polygon, see polygon for more details.

lty.K

line type for the K border, see polygon for more details.

lwd.K

line width for the K border, see polygon for more details.

col.arrow

arrow color, see arrows for more details.

angle.arrow

arrow angle head, see arrows for more details.

lwd.arrow

arrow width, see arrows for more details.

length.arrow

arrow head length, see arrows for more details.

col.G_k

color of the point representing G_k, see points for more details.

cex.G_k

size of the point representing G_k, see points for more details.

pch.G_k

type of the point representing G_k, see points for more details.

col.su

color of the points representing the sampling units (SU), see points for more details.

cex.su

size of the points representing the sampling units (SU), see points for more details.

pch.su

type of the points representing the sampling units (SU), see points for more details.

posi.leg

legend location in the graph, see legend for more details.

bty.leg

the type of box to be drawn around the legends. The allowed values are "o" (the default) and "n". See legend for more details

...

further arguments passed to or from other methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(subniche)
data(doubs)
dudi1 <- dudi.pca(doubs$env, scale = TRUE, scan = FALSE, nf = 3)
nic1 <- niche(dudi1, doubs$fish, scann = FALSE)
# number of sites
N <- dim(nic1$ls)[1]
#Create a factor which defines the subsets
fact <- factor(c(rep(1,N/2),rep(2,N/2)))
# nic1 will be use as reference and fact will be use to define the subniches environment
subnic1 <- subniche(nic1, fact)
eig <- round(subnic1$eig/sum(subnic1$eig)*100,2)[1:2]
#Two graphs are drawn one after the other
subplot(subnic1,main="Species subniche in K",
xlab=paste(paste("OMI1", eig[1], sep=" "),"%", sep=""),
ylab=paste(paste("OMI2", eig[2], sep=" "),"%", sep=""))

polak51/WitOMI documentation built on April 4, 2020, 6:14 p.m.