- network
A cograph_network object, matrix, data.frame, or igraph object.
Matrices and other inputs are auto-converted.
- size
Node size. Can be a single value, vector (per-node), or column name.
- shape
Node shape. Options: "circle", "square", "triangle", "diamond",
"pentagon", "hexagon", "ellipse", "heart", "star", "pie", "donut", "cross", "rectangle",
or any custom SVG shape registered with register_svg_shape().
- node_svg
Custom SVG for node shape: path to SVG file OR inline SVG string.
Overrides shape parameter when provided.
- svg_preserve_aspect
Logical: maintain SVG aspect ratio? Default TRUE.
- fill
Node fill color. Can be a single color, vector, or column name.
- border_color
Node border color.
- border_width
Node border width.
- alpha
Node transparency (0-1).
- label_size
Label text size.
- label_color
Label text color.
- label_position
Label position: "center", "above", "below", "left", "right".
- show_labels
Logical. Show node labels? Default TRUE.
- pie_values
For pie shape: list or matrix of values for pie segments.
Each element corresponds to a node and contains values for its segments.
- pie_colors
For pie shape: colors for pie segments.
- pie_border_width
Border width for pie chart nodes.
- donut_fill
For donut shape: numeric value (0-1) specifying fill proportion.
0.1 = 10% filled, 0.5 = 50% filled, 1.0 = fully filled ring.
Can be a single value (all nodes) or vector (per-node values).
- donut_values
Deprecated. Use donut_fill for simple fill proportion.
Still works for backwards compatibility.
- donut_color
For donut shape: fill color(s) for the donut ring.
Single color sets fill for all nodes.
Two colors set fill and background for all nodes.
More than 2 colors set per-node fill colors (recycled to n_nodes).
Default: "lightgray" fill, "gray90" background when shape="donut".
- donut_colors
Deprecated. Use donut_color instead.
- donut_border_width
Border width for donut chart nodes.
- donut_inner_ratio
For donut shape: inner radius ratio (0-1). Default 0.5.
- donut_bg_color
For donut shape: background color for unfilled portion.
- donut_shape
For donut: base shape for ring ("circle", "square", "hexagon", "triangle", "diamond", "pentagon"). Default "circle".
- donut_show_value
For donut shape: show value in center? Default FALSE.
- donut_value_size
For donut shape: font size for center value.
- donut_value_color
For donut shape: color for center value text.
- donut_value_fontface
For donut shape: font face for center value ("plain", "bold", "italic", "bold.italic"). Default "bold".
- donut_value_fontfamily
For donut shape: font family for center value ("sans", "serif", "mono"). Default "sans".
- donut_value_digits
For donut shape: decimal places for value display. Default 2.
- donut_value_prefix
For donut shape: text before value (e.g., "$"). Default "".
- donut_value_suffix
For donut shape: text after value (e.g., "%"). Default "".
- donut_value_format
For donut shape: custom format function (overrides digits).
- donut2_values
For double donut: list of values for inner donut ring.
- donut2_colors
For double donut: colors for inner donut ring segments.
- donut2_inner_ratio
For double donut: inner radius ratio for inner donut ring. Default 0.4.
- label_fontface
Font face for node labels: "plain", "bold", "italic", "bold.italic". Default "plain".
- label_fontfamily
Font family for node labels: "sans", "serif", "mono", or system font. Default "sans".
- label_hjust
Horizontal justification for node labels (0=left, 0.5=center, 1=right). Default 0.5.
- label_vjust
Vertical justification for node labels (0=bottom, 0.5=center, 1=top). Default 0.5.
- label_angle
Text rotation angle in degrees for node labels. Default 0.
- node_names
Alternative names for legend (separate from display labels).