Vertex shapes {igraph}R Documentation

Various vertex shapes when plotting igraph graphs

Description

Starting from version 0.5.1 igraph supports different vertex shapes when plotting graphs.

Details

Note that the current vertex shape implementation is experimental and it might change in the future. Currently vertex shapes are implemented only for plot.igraph.

In igraph a vertex shape is defined by a function that 1) provides information about the size of the shape for clipping the edges and 2) plots the shape if requested. These functions are called “shape functions” in the rest of this manual page.

Shape functions have a ‘mode’ argument that decides in which mode they should operate. ‘clip’ selects clipping mode and ‘plot’ selects plotting mode.

In clipping mode a shape function has the following arguments:

In ‘clipping’ mode, a shape function should return a matrix with the same number of rows as the el arguments. If end is both then the matrix must have four columns, otherwise two. The matrix contains the modified coordinates, with the clipping applied.

In plotting mode the following arguments are supplied to the shape function:

In ‘plotting’ mode the return value of the shape function is not used.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

See Also

igraph.plotting, plot.igraph

Examples

## Not run: 
g <- graph.ring(10, dir=TRUE, mut=TRUE)
plot(g, vertex.shape="rectangle", layout=layout.circle)

## End(Not run)

[Package igraph version 0.5.5-4 Index]