EdgeStyle

EdgeStyle

is an option and annotation for Graph and related functions that specifies what style to use for edges.

Details

  • The following option settings can be used:
  • Automaticuse automatic setting for style
    styleuse style for all edges
    {vivj->styleij,}use styleij for edge vivj
    {pattistylei,}use stylei for edges matching the pattern patti
  • Edges with explicit edge style vw->style are taken to use the automatic style.
  • The wrapper Style[vw,style] is equivalent to Annotation[vw,EdgeStyle->style] and can be used when creating graphs in functions such as Graph etc.
  • EdgeStyle can apply to lines and faces.
  • To specify multiple style directives use Directive[style1,style2,].
  • Style and other specifications are effectively applied in the order EdgeStyle, Style and other wrappers, and EdgeShapeFunction, with later specifications overriding earlier ones.

Examples

open allclose all

Basic Examples  (2)

Style all edges:

Style individual edges:

Scope  (9)

EdgeStyle can be used for general graphs:

Matrix graphs:

Special graphs:

Random graphs:

Use EdgeStyle in an Annotation wrapper:

Alternatively, use a Style wrapper:

Use Directive to set multiple style directives:

EdgeStyle works with patterns:

EdgeStyle can be combined with EdgeShapeFunction:

EdgeShapeFunction has higher priority than EdgeStyle:

EdgeStyle can be combined with BaseStyle:

EdgeStyle has higher priority than BaseStyle:

Possible Issues  (1)

Using Rule to indicate edges does not work:

Use parentheses to get correct parsing:

Introduced in 2010
 (8.0)