StrokeStyle

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

StrokeStyle

class StrokeStyle

Immutable stroke overrides shared by vertices and edges. None leaves an option to the renderer; it does not force a default override. Constructors and read-only properties expose options to help() and completion.

Examples

from symbolica.community.graph import StrokeStyle
settings = StrokeStyle(paint="#6f4d85", thickness=1.5)

Attributes

Name Description
dash Line pattern: “solid”, “dotted”, or “dashed”.
paint Stroke paint as a CSS color, for example “#6f4d85”.
thickness Finite nonnegative stroke width in points.

dash

StrokeStyle.dash: typing.Optional[builtins.str]

Line pattern: “solid”, “dotted”, or “dashed”.

Examples

from symbolica.community.graph import StrokeStyle
value = StrokeStyle().dash

paint

StrokeStyle.paint: typing.Optional[builtins.str]

Stroke paint as a CSS color, for example “#6f4d85”.

Examples

from symbolica.community.graph import StrokeStyle
value = StrokeStyle().paint

thickness

StrokeStyle.thickness: typing.Optional[builtins.float]

Finite nonnegative stroke width in points.

Examples

from symbolica.community.graph import StrokeStyle
value = StrokeStyle().thickness

Methods

Name Description
__new__ Construct immutable overrides; None preserves the renderer’s defaults.
__repr__ Inspect the selected overrides without rendering a diagram.

__new__

StrokeStyle.__new__(
    *,
    paint: typing.Optional[builtins.str] = None,
    thickness: typing.Optional[builtins.float] = None,
    dash: typing.Literal['solid', 'dotted', 'dashed'] | None = None,
) -> StrokeStyle

Construct immutable overrides; None preserves the renderer’s defaults.

Examples

from symbolica.community.graph import StrokeStyle
settings = StrokeStyle(paint="#6f4d85", thickness=1.5)

Parameters

  • paint (str or None, optional) Stroke paint as a CSS color, for example “#6f4d85”.
  • thickness (float or None, optional) Finite nonnegative stroke width in points.
  • dash (str or None, optional) Line pattern: “solid”, “dotted”, or “dashed”.

__repr__

StrokeStyle.__repr__() -> builtins.str

Inspect the selected overrides without rendering a diagram.

Examples

from symbolica.community.graph import StrokeStyle
text = repr(StrokeStyle(paint="#6f4d85", thickness=1.5))