plot.hypergraph {HyperG} | R Documentation |
Plot a hypergraph.
Description
Plot a hypergraph using the igraph plot function.
Usage
## S3 method for class 'hypergraph'
plot(x, edge.color = NA,
mark.groups=hypergraph_as_edgelist(h),
layout,...)
Arguments
x |
a hypergraph. |
edge.color |
color for the edges. |
layout |
optional layout for the plot. If the hypergraph has a layout attribute, this will be used, unless layout is given. if it does not have a layout attribute and the layout is not provided, it uses the code from igraph to choose a layout. |
mark.groups |
the groups correspond to the hyper-edges. Set this to NULL if you do not want the hyper-edge polygons to plot. |
... |
optional arguments passed to plot. |
Details
Plots the hypergraph, using the igraph plotting function applied to a graph converted from the hypergraph. For the example below, the plot will look something like:
Value
the layout is returned invisibly.
Author(s)
David J. Marchette dmarchette@gmail.com
See Also
as.graph
,
plot.igraph
,
igraph.plotting
.
Examples
h <- hypergraph_from_edgelist(list(3:7,8:12,c(1,3,9)))
plot(h)
[Package HyperG version 1.0.0 Index]