| cograph-package | R Documentation |
A modern, extensible network visualization package that provides high-quality static network plots and ggplot2 conversions. cograph accepts adjacency matrices, edge lists, or igraph objects and offers customizable layouts, node shapes, edge styles, and themes.
cograph: Main entry point for creating network visualizations
sn_layout: Apply layout algorithms
sn_nodes: Customize node aesthetics
sn_edges: Customize edge aesthetics
sn_theme: Apply visual themes
sn_render: Render to device
sn_ggplot: Convert to ggplot2 object
cograph provides several built-in layouts:
circle: Nodes arranged in a circle
spring: Fruchterman-Reingold force-directed layout
groups: Group-based circular layout
custom: User-provided coordinates
Built-in themes include:
classic: Traditional network visualization style
colorblind: Accessible color scheme
gray: Grayscale theme
dark: Dark background theme
minimal: Clean, minimal style
viridis: Viridis-based colour theme
nature: Nature-inspired colour theme
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. The alpha
argument (default 1) tunes how strongly weight differences compress
paths. Controlled by the invert_weights argument, which
auto-detects to TRUE for tna objects and FALSE for
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 = NA to 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.
Maintainer: Sonsoles López-Pernas sonsoles.lopez@uef.fi [copyright holder]
Authors:
Mohammed Saqr [copyright holder]
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.