gs.plot.grid: Graph Grid plot

Description Usage Arguments Value Author(s)

Description

A function that plots an igraph object, as a grid, with intensity denoted by the size of dots on the grid.

Usage

1
2
3
gs.plot.grid(g, title = "", src.label = "Vertex", tgt.label = "Vertex",
  edge.attr = NULL, font.size = NULL, vertex.label = FALSE,
  vertex.attr = FALSE, edge.xfm = FALSE, eps = 1e-04, degree = FALSE)

Arguments

g

input graph, as an igraph object. See graph for details.

title

the title for the square plot. Defaults to "".

src.label

the source label for the graph. Defaults to "Vertex".

tgt.label

the target label for the graph. Defaults to "Vertex".

edge.attr

the name of the attribute to use for weights. Defaults to NULL. Can be a list of edge.attr if you want to overlay different edge-attributes on the same plot. Supports up to 4 edge-attributes at once.

  • is.null(edge.attr) plots the graph as a binary adjacency matrix.

  • is.character(edge.attr) plot the graph as a weighted adjacency matrix, with edge-weights for E(g) given by E(g)[[edge.attr]].

font.size

the default font size for the plot text. Axis/legend text is font.size - 2. Defaults to NULL.

  • is.null(font.size) uses the default sizing for all fonts.

  • !is.null(font.size) uses font.size as the font sizing for the plots.

vertex.label

an attribute for naming the vertices. Defaults to NULL.

  • vertex.label==FALSE name the vertices V(g) sequentially, as 1, 2, ... n.

  • vertex.label==TRUE name the vertices V(g) as V(g)$name.

vertex.attr

an attribute to color vertices. Defaults to FALSE.

  • vertex.attr==FALSE assumes no grouping of the vertices, and adds no color accordingly.

  • is.character(vertex.attr) assumes a grouping of the vertices given for V(g) by V(G)[[vertex.attr]], and groups the vertices in V(g) into ordered blocks with color-coding.

edge.xfm

transform the edge-weights. Defaults to FALSE. Can be a list of edge.xfm if you want to overlay different edge-attributes on the same plot in the plot with different transforms for each.

  • edge.xfm==FALSE do not transform the edge-weights.

  • edge.xfm == "log" transform the edge values, using the natural-logarithm operation. See log for details. Does not work if there are negative edge-weights. Pads with eps << min(edge-weight) if there are entries of zero in the graph.

  • edge.xfm == "log10" transform the edge values, using the logarithm-base-10 operation. See log10 for details. Does not work if there are negative edge-weights. Pads with eps << min(edge-weight) if there are entries of zero in the graph.

eps

if you specify an edge.xfm that is logarithmic, indicate the padding that zero entries should receive. Defaults to .0001. eps should be << min(edge-weight).

degree

Whether to plot the marginal vertex degrees. Defaults to FALSE.

Value

the graph/graphs as a plot.

Author(s)

Eric Bridgeford


neurodata/graphstats documentation built on May 14, 2019, 5:19 p.m.