Skip to main content
added 214 characters in body
Source Link
Vitaliy Kaurov
  • 73.4k
  • 9
  • 206
  • 365

Assign your data to variables, for convenience:

gDat1 = {"Al-1" -> "Bru-2", "Bru-2" -> "Gra-7", ... };

gDat2 = {"Al-1" -> "Bru-2", "Al-1" -> "Dave-4", ... };
 

Find your 1st graph layout:

g1 = Graph[gDat1];
Graph[gDat1, GraphStyle -> "ThickEdge"]

enter image description here

Build your 2nd graph using 1st graph vertex coordinates:

g2 = Graph[gDat2, AbsoluteOptions[g1, VertexCoordinates], VertexStyle -> Red]Red];

enter image description here

Verify that there is indeed exact correspondence between vertex coordinates of 2 graphs:

Show[g1, g2]

enter image description here

gDat1 = {"Al-1" -> "Bru-2", "Bru-2" -> "Gra-7", ... };

gDat2 = {"Al-1" -> "Bru-2", "Al-1" -> "Dave-4", ... };
 
g1 = Graph[gDat1];

Graph[gDat2, AbsoluteOptions[g1, VertexCoordinates], VertexStyle -> Red]

enter image description here

Assign your data to variables, for convenience:

gDat1 = {"Al-1" -> "Bru-2", "Bru-2" -> "Gra-7", ... };

gDat2 = {"Al-1" -> "Bru-2", "Al-1" -> "Dave-4", ... };

Find your 1st graph layout:

g1 = Graph[gDat1, GraphStyle -> "ThickEdge"]

enter image description here

Build your 2nd graph using 1st graph vertex coordinates:

g2 = Graph[gDat2, AbsoluteOptions[g1, VertexCoordinates], VertexStyle -> Red];

enter image description here

Verify that there is indeed exact correspondence between vertex coordinates of 2 graphs:

Show[g1, g2]

enter image description here

Source Link
Vitaliy Kaurov
  • 73.4k
  • 9
  • 206
  • 365

gDat1 = {"Al-1" -> "Bru-2", "Bru-2" -> "Gra-7", ... };

gDat2 = {"Al-1" -> "Bru-2", "Al-1" -> "Dave-4", ... };

g1 = Graph[gDat1];

Graph[gDat2, AbsoluteOptions[g1, VertexCoordinates], VertexStyle -> Red]

enter image description here