Skip to contents

Apply a visual theme to the network.

Usage

sn_theme(network, theme, ...)

Arguments

network

A cograph_network object, matrix, data.frame, or igraph object. Matrices and other inputs are auto-converted.

theme

Theme name (string) or CographTheme object.

...

Theme parameters to override, such as background, node_fill or edge_color. An unknown parameter name raises an error.

Value

The cograph_network with the theme stored in its theme element.

Details

Available Themes

"classic"

White background, blue nodes and gray edges.

"dark"

Dark background with bright nodes, for presentations.

"minimal"

Subtle styling with thin edges and muted colors.

"colorblind"

Optimized for color vision deficiency.

"gray"/"grey"

Black and white theme suitable for print.

"viridis"

Perceptually uniform colors.

"nature"

Nature-inspired colors.

Use list_themes() to see all available themes.

See also

cograph for network creation, sn_palette for color palettes, sn_nodes for node customization, sn_edges for edge customization, list_themes to see available themes, splot and soplot for plotting

Examples

cograph(regulation_net) |> sn_theme("dark") |> splot()