Learn R Programming

gmum.r (version 0.2.1)

plot.Rcpp_GNGServer: plot GNG object

Description

Plot resulting graph using igraph plotting

Usage

"plot"(x, vertex.color = gng.plot.color.cluster, layout = layout.fruchterman.reingold, mode = gng.plot.2d, vertex.size = 3, ...)

Arguments

x
GNG object
vertex.color
How to color vertexes. Possible values: "fast.cluster" (vertex color is set to fastgreedy.community clustering), "label" (rounds to integer label if present), list of integers (colors vertices according to provided list), "none" (every node is white),
layout
igraph layout to be used when plotting. Defaults to layout.fruchterman.reingold. Other good choice is using gng.plot.layout.v2d, which returns two first spatial coordinates.
mode
"2d" (igraph plot) "2d.errors" (igraph plot with mean error log plot)
vertex.size
Size of plotted vertices
...
other arguments not used by this method.

Details

Plot GNG

Examples

Run this code
## Not run: 
# gng <- GNG(scaled.wine)
# # Plots igraph using first 2 coordinates and colors according to clusters
# plot(gng, mode=gng.plot.2d.errors, layout=gng.plot.layout.v2d, vertex.color=gng.plot.color.cluster)
# 
# # For more possibilities see gng.plot.* constants
# ## End(Not run)

Run the code above in your browser using DataLab