plot.igraph {igraph}R Documentation

Plotting of graphs

Description

plot.graph is able to plot graphs to any R device. It is the non-interactive companion of the tkplot function.

Usage

plot.igraph(x, layout = layout.random, layout.par = list(), 
    labels = NULL, label.color = "darkblue", label.font = NULL, 
    label.degree = -pi/4, label.dist = 0, vertex.color = "SkyBlue2", 
    vertex.size = 15, edge.color = "darkgrey", edge.width = 1,
    edge.labels = NA, vertex.frame.color="black",
    axes = FALSE, xlab = "", ylab = "", xlim=c(-1,1), ylim=c(-1,1), ...)

Arguments

x The graph to plot.
layout The coordinates of the vertices, or the method to calculate them. See the same argument of tkplot.
layout.par List, the parameters of the layout function. See the same argument of tkplot.
labels The labels of the vertices. See the same argument of tkplot.
label.color The color(s) of the labels. See the same argument of tkplot.
label.font The font to be used for the labels. Right now all labels use the same font.
label.degree Specifies the placement of the labels of the vertices. See the same argument of tkplot.
label.dist Specifies the placement of the vertex labels. See the same argument of tkplot.
vertex.color The color(s) of the vertices. See the same argument of tkplot.
vertex.size The size(s) of the vertices. See the same argument of tkplot.
edge.color The color(s) of the edges. See the same argument of tkplot.
edge.width The width(s) of the edges. See the same argument of tkplot.
edge.labels Labels for the edges, this will be converted to a character vector. The default is NA which suppresses edge labels. The vector might contain NA's as well to suppress labels for some edges.
vertex.frame.color The color(s) of the border of the vertices.
axes Logical, whether to plot axes, defaults to FALSE.
xlab The label of the horizontal axis. Defaults to the empty string.
ylab The label of the vertical axis. Defaults to the empty string.
xlim The limits for the horizontal axis, it is unlikely that you want to modify this.
ylim The limits for the vertical axis, it is unlikely that you want to modify this.
... Additional arguments, passed to plot.

Details

One convenient way to plot graphs is to plot with tkplot first, handtune the placement of the vertices, query the coordinates by the tkplot.getcoords function and use them with plot to plot the graph to any R device.

The additional arguments specified are passed to the plot function.

Value

Returns NULL, invisibly.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

See Also

layout for different layouts, tkplot for the better description of the parameters and an interactive version.

Examples

g <- graph.ring(10)
## Not run: plot(g, layout=layout.kamada.kawai, vertex.color="green")

[Package igraph version 0.2.1 Index]