Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight subgraph using Wolfram Mathematica

Using Wolfram Mathematica 10.0 I'm trying to highlight a subgraph from the whole graph. As can see at the figure, I succeeded to highlight the subgraph and color the nodes and the edges in a specific color (green). I want that the subgraph will be on the top, such that it will be convenient to see the subgraph edges and nodes.

Anyone know how to do that?

Highlight subgraph

like image 966
Michal Vanunu Avatar asked Aug 19 '26 09:08

Michal Vanunu


1 Answers

If you used HighlightGraph, you can reorder the vertices of the graph to define the rendering order. Do it manually, or use IGReorderVertices from the IGraph/M package.

Alternatively, check the "Rendering Order" section of the GraphLayout documentation page—it shows how to define the rendering order without changing the order of the vertex list.

like image 172
Szabolcs Avatar answered Aug 21 '26 17:08

Szabolcs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!