plot.igraph
is able to plot graphs to any R device. It is the
non-interactive companion of the tkplot
function.## S3 method for class 'igraph':
plot(x, axes = FALSE, add = FALSE, xlim = c(-1, 1),
ylim = c(-1, 1), mark.groups = list(), mark.shape = 1/2,
mark.col = rainbow(length(mark.groups), alpha = 0.3),
mark.border = rainbow(length(mark.groups), alpha = 1), mark.expand = 15,
...)
xspline
function, its possible
values are betwxspline
; e.g.
numeric color ids, symbolic color names, or colors in RGB.NA
, then no border is
drawn.NULL
, invisibly.tkplot
first, handtune the placement of the vertices, query the coordinates by the
tk_coords
function and use them with plot
to
plot the graph to any R device.layout
for different layouts,
igraph.plotting
for the detailed description of the plotting
parameters and tkplot
and rglplot
for other
graph plotting functions.g <- ring(10)
plot(g, layout=layout_with_kk, vertex.color="green")
Run the code above in your browser using DataLab