HighlightTrail - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

HighlightTrail

  

highlight a trail of vertices on a graph

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

HighlightTrail(G, T)

HighlightTrail(G, T, C, ip)

HighlightEdges(G, T, stylesheet=[ optionsequence ], ip)

Parameters

G

-

graph

T

-

a list of vertices (the trail) of G

C

-

(optional) color or list of colors

ip

-

(optional) equation of the form inplace = true or inplace = false

stylesheet

-

(optional) optionsequence is a sequence of keyword options to specify the style or a list of such sequences.

Description

• 

By default the DrawGraph command draws the edges and vertices of the graph with the same set of style options. The command HighlightTrail allows the trail to be given a different highlighted style specified in the graph stylesheet.

• 

Given only a graph G and an trail T, HighlightTrail marks the specified edges to be rendered with the default highlighted style.

• 

If you simply want a trail to have a different style, without being grouped with other highlighted graph components, use the command StyleEdge or StyleSubgraph instead.

• 

If you want to highlight a trail but give it a different color, the simplest way is to specify C, a color for the edges. The colors C can be given in any form understood by Maple. See ColorTools/Formats for details.

• 

If a list of colors or stylesheets is given, then they are used to associate a different color or style to each member of the trail.

• 

By default, this command modifies G and returns nothing. If you supply the option inplace = false, then instead the changes are applied to a copy of G, and that copy is returned.

• 

More precise overriding of the highlighted style can be set using stylesheet options. The stylesheet options are understood as modifiers to the default highlighted style. So, for example, if a color is not specified the default highlighted color is used. If the stylesheet option and a color C are both given, the color C is ignored. See StyleEdge for a complete list of edge style options.

Examples

withGraphTheory:

K5CompleteGraph5

K5Graph 1: an undirected graph with 5 vertices and 10 edge(s)

(1)

IsHamiltonianK5,cycle

true

(2)

cycle

1,2,3,4,5,1

(3)

mustardColorTools:-ColorRGB,0.9,0.6,0.

mustardRGB : 0.9 0.6 0

(4)

HighlightTrailK5,cycle,mustard

DrawGraphK5

Compatibility

• 

The GraphTheory[HighlightTrail] command was updated in Maple 2019.

See Also

DrawGraph

HighlightEdges

HighlightSubgraph

HighlightVertex

StyleEdge

StyleSubgraph

Trail