View source: R/plot.hero_adjacent.R
| plot.hero_adjacent | R Documentation |
hero_adjacent objectPlot a hero_adjacent object. x$nbrs is
used to construct a
sparseMatrix-class object. The
default behavior is to plot the sparse matrix using the
image function. However, if the
igraph package is installed, a graph is made using
graph_from_adjacency_matrix and
then plotted using plot.igraph.
## S3 method for class 'hero_adjacent'
plot(x, ...)
x |
A |
... |
Additional arguments passed to
|
coords = expand.grid(1:4, 1:4)
a = adjacent(coords, digits = 1)
plot(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.