| sn_theme | R Documentation |
Apply a visual theme to the network.
sn_theme(network, theme, ...)
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. |
... |
Additional theme parameters to override. |
Default theme with white background, blue nodes, gray edges.
Dark background with light nodes. Good for presentations.
Subtle styling with thin edges and muted colors.
Optimized for color vision deficiency.
Black and white theme suitable for print.
Perceptually uniform colors.
Nature-inspired colors.
Use list_themes() to see all available themes.
Modified cograph_network object.
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
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
cograph(adj) |> sn_theme("dark") |> splot()
# Override a theme property
cograph(adj) |> sn_theme("classic", background = "lightgray") |> splot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.