plot.gv: Plot a 'gv' object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plot.gv.R

Description

Plot the semi-variogram in a gv object. If a multiple genetic distances are found, it plots the median value and the 95% confidence interval for the median.

Usage

1
2
3
4
5
6
## S3 method for class 'gv'
plot(x, line.res = 100, pch=1, legend=TRUE, leg.x=NA,
                  leg.y=NA, leg.cex=1, bar.length=0.1, bar.col="gray",
                  bar.lty=par("lty"), xlab='Distance', ylab='Semivariance',
                  x.line=3, y.line=3, ncol=1, main=NULL,
                  leg.label = expression(italic('n')*' size'), ...)

Arguments

x

'gv' object as given by 'gen.variogram'.

line.res

Number of points in the model line.

pch

Symbol to be used in the plot.

legend

Boolean indicating if a legend showing n size should be printed.

leg.x

The x position for the legend. The legend will be placed at the right side of the plot if this value is set to NA.

leg.y

The y position for the legned. The legend will be placed at the bottom of the plot if this value is set to NA.

leg.cex

Multiplication factor for the legend symbol size.

bar.length

If multiple trees are given, confidence interval bars are ploted. The horizontal length of the line at both bar tips is defined with this parameter (defaults to 0.1).

bar.col

The color of the bars when multiple trees are given.

bar.lty

The line type for the bars when multiple tree are given.

xlab

The label for x axis.

ylab

The label for y axis.

x.line

Position of x label in lines.

y.line

Position of y label in lines.

ncol

Number of legend columns.

main

Main title of the plot.

leg.label

Legend title.

...

Further plotting arguments to be passed.

Details

Simple plot of the semi-variogram contained in a 'gv' object. If the object has a model, the model line is also plotted.

Value

Plot.

Author(s)

Pedro Tarroso <ptarroso@cibio.up.pt>

See Also

gen.variogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(vipers)
data(d.gen)

# create a distance matrix between samples
r.dist <- dist(vipers[,1:2])

# fit a variogram with defaults (shperical model) and estimation of range
gv <- gen.variogram(r.dist, d.gen, 0.25)

#plot semi-variogram
plot(gv)

# plot semi-variogram with model
gv <- gv.model(gv)
plot(gv)

phylin documentation built on Dec. 12, 2019, 5:07 p.m.