# Register a custom SVG shape from an inline SVG string
register_svg_shape("simple_star",
'
')
# Create a small adjacency matrix
adj <- matrix(c(0, 1, 1, 0, 0, 1, 1, 0, 0), nrow = 3,
dimnames = list(c("A", "B", "C"), c("A", "B", "C")))
# Use in network (requires grImport2 for SVG rendering; falls back to circle)
cograph(adj) |> sn_nodes(shape = "simple_star")
Run the code above in your browser using DataLab