plot_graph {gasper} | R Documentation |
Plot Graph
Description
Visualizes a graph using ggplot2. It plots nodes as points and edges as segments connecting these points.
Usage
plot_graph(z, size = 0.75)
Arguments
z |
A list containing graph data. This list must have the following components:
|
size |
Numeric. Dot size for nodes. Default is 0.75. |
Details
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.
Note
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.
See Also
download_graph
, plot_signal
, spectral_coords
Examples
data(grid1)
plot_graph(grid1)