Learn R Programming

archeofrag (version 1.2.0)

frag.graph.plot: Plot a fragmentation graph

Description

A function to plot the graph made by the archeofrag package.

Usage

frag.graph.plot(graph, layer.attr, ...)

Value

Returns NULL and plot the graph.

Arguments

graph

An igraph undirected object with a "frag_type" attribute.

layer.attr

Character. The name of the vertices attribute giving the spatial unit of each fragment.

...

Optional arguments sent to plot.igraph.

Author

Sebastien Plutniak <sebastien.plutniak at posteo.net>

Details

This function is a wrapper for the plot.igraph method for igraph objects. The layout is computed using the fruchterman-reingold algorithm, with some changes as a function of the value of the "frag_type" graph attribute. For graphs including similarity relations, igraph' component_wise layout modifier is applied. For graphs with connection and similarity relationships, the edges for connection relations are coloured in green. For graphs with connection relationships only and two spatial units, the vertices are placed on the top (spatial unit 1) and bottom (spatial unit 2) part of the plot.

See Also

Examples

Run this code
g <- frag.simul.process(n.components=20, vertices=50, disturbance=.15)
frag.graph.plot(g, "layer")

Run the code above in your browser using DataLab