A modern, extensible network visualization package that provides high-quality static network plots and ggplot2 conversions. cograph accepts adjacency matrices, edge lists, igraph, statnet network, qgraph and tna objects and offers customizable layouts, node shapes, edge styles, and themes.
Main Functions
splot: Plot a network with base R graphicssoplot: Plot a network with grid graphicscograph: Create a network object for the builder functionssn_layout: Apply layout algorithmssn_nodes: Customize node aestheticssn_edges: Customize edge aestheticssn_theme: Apply visual themessn_render: Render to devicesn_ggplot: Convert to ggplot2 object
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 styleviridis: Viridis-based color themenature: Nature-inspired color theme
Weight conventions
In the analytic functions an edge weight is a strength. A higher weight means a stronger connection, such as a larger transition probability or a stronger correlation. This follows the convention of qgraph and tna.
Path-based measures such as betweenness, closeness, harmonic centrality and
eccentricity can convert weights to distances as 1 / weight^alpha.
The invert_weights argument of centrality controls
this conversion. Its default is TRUE for tna objects and
FALSE for other inputs, which matches igraph and sna. The
alpha argument (default 1) sets the exponent.
Measures that do not use paths, such as degree, strength, eigenvector
centrality, PageRank and transitivity, use the weights as given. Functions
with a weights argument, such as shortest_paths,
compute unweighted results when weights = NA. Individual help pages
document exceptions.
Author
Maintainer: Sonsoles López-Pernas sonsoles.lopez@uef.fi [copyright holder]
Authors:
Mohammed Saqr [copyright holder]
