Learn R Programming

flare (version 1.7.0.1)

sugm.plot: Graph visualization for an object with S3 class "sugm"

Description

Implements the graph visualization using adjacency matrix. It can automatic organize 2D embedding layout.

Usage

sugm.plot(G, epsflag = FALSE, graph.name = "default", cur.num = 1, 
          location)

Arguments

G

The adjacency matrix corresponding to the graph.

epsflag

If epsflag = TRUE, save the plot as an eps file in the target directory. The default value is FALSE.

graph.name

The name of the output eps files. The default value is "default".

cur.num

The number of plots saved as eps files. Only applicable when epsflag = TRUE. The default value is 1.

location

Target directory. The default value is the current working directory.

Details

The user can change cur.num to plot several figures and select the best one. The implementation is based on the popular package "igraph".

See Also

flare and flare-package

Examples

Run this code
# NOT RUN {
## load package required
library(flare)

## visualize the hub graph
L = sugm.generator(graph = "hub")
sugm.plot(L$theta)

## visualize the band graph
L = sugm.generator(graph = "band",g=5)
sugm.plot(L$theta)

## visualize the cluster graph
L = sugm.generator(graph = "cluster")
sugm.plot(L$theta)

# }
# NOT RUN {
#show working directory
getwd()
#plot 5 graphs and save the plots as eps files in the working directory  
sugm.plot(L$theta, epsflag = TRUE, cur.num = 5)
# }

Run the code above in your browser using DataLab