plot_graph | R Documentation |
Visualizes a graph using ggplot2. It plots nodes as points and edges as segments connecting these points.
plot_graph(z, size = 0.75)
z |
A list containing graph data. This list must have the following components:
|
size |
Numeric. Dot size for nodes. Default is 0.75. |
The function is primarily designed to work with the output from the download_graph
function. This ensures that the graph visualization upholds the structure and properties of the retrieved graph. However, the function can also be utilized to visualize custom graph structures, provided they match to the input format.
If node coordinates xy
are not provided, they will be calculated using spectral methods spectral_coords
. For large graphs, this can be computationally intensive and may take significant time. Use with caution for large graphs if node coordinates are not supplied.
download_graph
, plot_signal
, spectral_coords
data(grid1)
plot_graph(grid1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.