highlight the edges of a graph
HighlightEdges(G, E, C, ip)
HighlightEdges(G, E, stylesheet=[ optionsequence ], ip)
a single edge or a list or set of edges of G or a subgraph of G or a list or set of subgraphs of G
(optional) color or list of colors
(optional) equation of the form inplace = true or inplace = false
(optional) optionsequence is a sequence of keyword options to specify the style or a list of such sequences.
By default the DrawGraph command draws the edges and vertices of the graph with the same set of style options. The command HighlightEdges, marks the specified edges to be rendered with the default highlighted style.
Given only a graph G and an edge or edges E, HighlightEdges marks the specified edges to be rendered with the default highlighted style. If E is one or more subgraphs of G, then the edges in those subgraphs are highlighted. Use HighlightSubgraph instead if you want to highlight both edges and vertices of the subgraphs.
If you want to highlight a edge but give it a different color, then give C, a color for the edge. The colors C can be given in any form understood by Maple. See ColorTools/Formats for details.
If E is a list of edges or subgraphs, then a list of colors or stylesheets can be used to associate a different color or style to each member.
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.
K5≔Graph 1: an undirected unweighted graph with 5 vertices and 10 edge(s)
ST≔Graph 2: an undirected unweighted graph with 5 vertices and 4 edge(s)
If we want a version of K5 with ST highlighted, but we also want to keep the current version of K5, we can use the inplace option.
K5_with_ST≔Graph 3: an undirected unweighted graph with 5 vertices and 10 edge(s)
K5 is unmodified.
G≔Graph 4: a directed weighted graph with 3 vertices and 5 arc(s)
P≔Graph 5: an undirected unweighted graph with 10 vertices and 15 edge(s)
P1≔Graph 6: an undirected unweighted graph with 5 vertices and 5 edge(s)
P2≔Graph 7: an undirected unweighted graph with 5 vertices and 5 edge(s)
The GraphTheory[HighlightEdges] command was updated in Maple 2019.
The stylesheet option was updated in Maple 2019.
Download Help Document
What kind of issue would you like to report? (Optional)