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:
sA An adjacency matrix or a sparse Matrix representation of the graph.
xy A matrix or dataframe containing the x and y coordinates of each node in the graph.
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.