The function to represent the species subniche under each subenvironment K with their respective marginality from G_K.
subplot_sp(
subnic,
sp,
main = NULL,
col.axis = "azure3",
lty.axis = 2,
lwd.axis = 2,
xlab = NULL,
ylab = NULL,
border.E = "black",
col.E = "#92c5de",
lty.E = 1,
lwd.E = 1,
border.K = "black",
lwd.K = 1,
col.K = "#2c7fb8",
lty.K = 1,
col.Gk.pos = "red",
col.Gk.pt = "black",
cex.Gk.pos = 1,
pch.Gk.pos = 21,
border.SP = "#bc5090",
col.SB = "#ffff99",
lty.SP = 1,
lwd.SP = 2,
border.NR = "#fdb462",
col.NR = NA,
lty.NR = 1,
lwd.NR = 2,
border.SR = "#a1d99b",
col.SR = "#a1d99b",
lty.SR = 1,
lwd.SR = 1,
pch.SR.pos = 19,
cex.SR.pos = 1,
col.SR.pt = "black",
col.SR.pos = "black",
cex.SR.lab = 0.7,
col.SR.lab = "black",
fac.SR.lab = 1.2,
font.sp = 2,
col.arrow = "black",
angle.arrow = 20,
lwd.arrow = 2,
length.arrow = 0.1,
leg = T,
posi.leg = "topleft",
bty.leg = "n",
...
)
an object of class subniche
.
a character string of the species name.
a main title for the plot, see title for more details.
axis color, see par for more details.
axis line type, see par for more details.
axis width, see par for more details.
label for x-axis, see title for more details.
label for y-axis, see title for more details.
color border of E polygon, see polygon for more details.
inside color of E polygon, see polygon for more details.
line type for the E border, see polygon for more details.
line width for the E border, see polygon for more details.
color border of K polygon, see polygon for more details.
line width for the K border, see polygon for more details.
inside color of K polygon, see polygon for more details.
line type for the K border, see polygon for more details.
color of the point representing G_k, see points for more details.
point color contour if pch=21:25.
size of the point representing G_k, see points for more details.
type of the point representing G_k, see points for more details.
color border of species subniche polygon, see polygon for more details.
color of the SB area.
line type for the SP border, see polygon for more details.
line width for the SP border, see polygon for more details.
color border of NR polygon, see polygon for more details.
inside color of NR polygon, see polygon for more details.
line type for the NR border, see polygon for more details.
line width for the NR border, see polygon for more details.
color border of SR polygon, see polygon for more details.
inside color of SR polygon, see polygon for more details.
line type for the SR border, see polygon for more details.
line width for the SR border, see polygon for more details.
type of points representing the SR position, see points for more details.
size of points representing the SR position, see points for more details.
point color contour if pch=21:25.
color of points representing the SR position, see points for more details.
size of the species label representing the SR position, see text for more details.
color of the species label representing the SR position, see text for more details.
factor for moving the SR labels from its original coordinates for clarity, by defaults they are multiply 1.2
An integer which specifies which font to use for species label. 1 corresponds to plain text (the default), 2 to bold face, 3 to italic and 4 to bold italic, see par for more details.
arrow color, see arrows for more details.
arrow angle head, see arrows for more details.
arrow width, see arrows for more details.
arrow head length, see arrows for more details.
a logical option for legend to be plotted or not, default leg=T.
legend location in the graph, see legend for more details.
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.
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_sp(subnic1,"Neba")
Run the code above in your browser using DataLab