A modern, extensible network visualization package that provides high-quality static and interactive network plots. cograph accepts adjacency matrices, edge lists, or igraph objects and offers customizable layouts, node shapes, edge styles, and themes.
Layouts
cograph provides several built-in layouts:
circle: Nodes arranged in a circlespring: Fruchterman-Reingold force-directed layoutgroups: Group-based circular layoutcustom: User-provided coordinates
Themes
Built-in themes include:
classic: Traditional network visualization stylecolorblind: Accessible color schemegray: Grayscale themedark: Dark background thememinimal: Clean, minimal style
Weight conventions
cograph's analytic functions follow a single convention for edge weights:
Semantics. A weight is a strength: higher weight means a stronger connection (larger transition probability, thicker correlation, stronger tie). This matches the qgraph / tna convention and the intuition of most user-facing inputs.
Path-based measures (betweenness, closeness, harmonic, eccentricity, stress, load, radiality, etc.) invert weights to distances via
1 / weight ^ alpha. Thealphaargument (default 1) tunes how strongly weight differences compress paths. Controlled by theinvert_weightsargument, which auto-detects toTRUEfor tna objects andFALSEfor matrices/igraph (matching native igraph / sna defaults).Non-path measures (degree, strength, eigenvector, PageRank, transitivity, modularity, ...) use the raw weights as-is without inversion.
Unweighted override. Passing
weights = NAto any analytic function forces unweighted behavior regardless of what is attached to the graph.
Individual functions may document exceptions in their own help pages. Any deviation from this convention is a bug — please report.
Author
Maintainer: Sonsoles López-Pernas sonsoles.lopez@uef.fi [copyright holder]
Authors:
Mohammed Saqr [copyright holder]
