plot.graph
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, xlab="", ylab="", add=FALSE,
xlim=c(-1,1), ylim=c(-1,1), main="", sub="",
mark.groups=list(), mark.shape=1/2, mark.border=NA,
mark.col=rainbow(length(mark.groups), alpha=0.3),
mark.expand=15,
...)
xspline
function, its
possible valNA
, then no
border is drawn.xspline
; e.g. numeric color ids, symbolic
color names, or colors in RGB.plot
.NULL
, invisibly.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.layout
for different layouts,
igraph.plotting
for the detailed description of the
plotting parameters and tkplot
and rglplot
for other graph plotting functions.g <- graph.ring(10)
plot(g, layout=layout.kamada.kawai, vertex.color="green")
Run the code above in your browser using DataCamp Workspace