Learn R Programming

multigraph (version 1.0)

ccgraph: Cayley Colour Graph

Description

A function to create and manipulate Cayley colour graphs of semigroup structures.

Usage

ccgraph(x, main = NULL, seed = 0, maxiter = 100, alpha = c(1, 1, 1), 
        scope, loops, collRecip, undRecip, showLbs, cex.main, col.main, font.main, 
        conc, coord, clu, cex, lwd, pch, lty, bwd, bwd2, att, bg, mar, pos, asp, 
        ecol, vcol, vcol0, lbs, col, lbat, swp, swp2, rot, vedist, vldist, 
        mirrorX, mirrorY, mirrorD, mirrorL, mirrorV, mirrorH, ffamily, fstyle, 
        fsize, fcol, scl, hds, nr, gens, flip, ...)

Value

A plot of the semigroup or group structure.

Arguments

x

An algebraic structure like a ‘Semigroup’ class object (cf. semigroup).

main

(optional) Main title of the plot graph.

seed

(optional) Random seed number for initial coordinates of vertices.

maxiter

(optional) Maximum number of iterations in layout algorithm.

alpha

Vector with the alpha colour transparencies for (vertex, edge, bg).

scope

(optional) List with scope of graph, edge and vertex characteristics.

loops

(optional and logical) Plot loops in graph?

collRecip

(optional and logical) Collapse reciprocated edges in graph?

undRecip

(optional and logical) Plot reciprocated edges as undirected?

showLbs

(optional and logical) Show vertex labels in graph when available?

cex.main

Font size of title in plot graph.

col.main

Font colour of title in plot graph.

font.main

Font family of title in plot graph.

conc

(optional and logical) Is layout concentric?

coord

(optional, ignored if "conc") Two-column data frame of vertex coordinates in graph.

clu

(optional) Clustering of vertices.

cex

(optional) Vertex size.

lwd

(optional) Width of edges.

pch

(optional) Symbol for vertices.

lty

(optional) Shape of edges.

bwd

(optional, default 1) Real number for width between bundle edges.

bwd2

(optional, experimental) width of the bundle loop edges.

att

(optional) Vector or array representing vertex attributes.

bg

(optional) Background colour of plot graph.

mar

(optional) Vector with margins for plot.

pos

(optional) Position of labels from vertex:

  • 1: Below

  • 2: Left

  • 3: Above

  • 4: Right

  • 0: Centre

asp

(optional, asp=NA cover whole canvas) Aspect ratio of plot.

ecol

(optional) Colour of edges.

vcol

(optional) Colour of vertices.

vcol0

(optional) Colour of vertices contour.

lbs

(optional) Vertex labels.

col

(optional) Alias for vcol.

lbat

(optional) Labels for vertex attributes.

swp

(optional and logical) Swap bundle patterns?

swp2

(optional and logical) Swap reciprocals?

rot

(optional) Clockwise rotation in degrees on graph.

vedist

(optional) Vertex--edge distance.

vldist

(optional) Vertex--loop distance.

mirrorX

(optional) Mirror by \(X\) axis.

mirrorY

(optional) Mirror by \(Y\) axis.

mirrorD

(optional) Mirror reflection across diagonal \(Y=X\).

mirrorL

(optional) Mirror reflection across diagonal \(Y=-X\).

mirrorV

“Same as mirrorX”.

mirrorH

“Same as mirrorY”.

ffamily

(optional) Font family of vertex labels in graph.

fstyle

(optional) Font style of vertex labels in graph with options: bold, italic, bolditalic.

fsize

(optional) Font size of vertex labels in graph.

fcol

(optional) Font colour of text in graph vertices.

scl

(optional) Numerical scalar (\(x\) and \(y\)) or vector (\(x\), \(y\)) of graph scale.

hds

(optional) Head scale for arcs.

nr

(conc layout) Number of radii.

gens

(optional when absent) Semigroup generators in x.

flip

(optional and logical) Flip loops per \(D\)-class?

...

Additional argument items.

Details

The Cayley colour graph is a graphical representation of the relationships among relations in the relational structure of a given multiplex network. Both nodes and directed edges represent string relations, and each shape and colour corresponds to a specific generator relation of the semigroup structure.

See Also

semigroup, multigraph, frcd, conc

Examples

Run this code
# Create an abstract semigroup from random data
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
       c(3,3,2))>.5, 1 ) )

S <- semigroup(arr)

# plot semigroup Cayley graph
ccgraph(S)

Run the code above in your browser using DataLab