# Choice of GraphLayout to draw undirected graph

I would like to adjust the GraphLayout of the undirected graph given in the code below, which looks like the following figure:

Graph[{1, 2, 3, 4}, {{1, 2}, {1, 4}, {2, 3}, {3, 4}} //
Map[Apply[UndirectedEdge]], VertexWeight -> {1, 2, 3, 4},
GraphLayout -> "CircularEmbedding",
VertexLabels -> Placed["Name", Center], VertexSize -> Medium,
VertexStyle -> {LightGray},
VertexLabelStyle -> Directive[15, Black, Bold, Italic]]

Please any help. Thank you in advance.

• try GraphLayout -> "GridEmbedding"?
– kglr
Mar 7, 2023 at 15:00
• @kglr No, it doesn't give me the required graph. Instead, "HighDimensionalEmbedding" works, but the position of the vertices are not balanced. Mar 7, 2023 at 15:03

1. Use {"CircularEmbedding", "Offset" -> - 45 Degree} as the setting for GraphLayout:

Graph[{1, 2, 3, 4},
{{1, 2}, {1, 4}, {2, 3}, {3, 4}} // Map[Apply[UndirectedEdge]],
GraphLayout -> {"CircularEmbedding", "Offset" -> - 45 Degree},
VertexLabels -> Placed["Name", Center],
VertexSize -> Medium,
VertexStyle -> {LightGray},
VertexLabelStyle -> Directive[15, Black, Bold, Italic]]

2. Use {4,1,3,2} as the vertex list in the first argument of Graph and set GraphLayout -> "GridEmbedding":

Graph[{4, 1, 3, 2},
{{1, 2}, {1, 4}, {2, 3}, {3, 4}} // Map[Apply[UndirectedEdge]],
GraphLayout -> "GridEmbedding",
VertexLabels -> Placed["Name", Center], VertexSize -> Medium,
VertexStyle -> {LightGray},
VertexLabelStyle -> Directive[15, Black, Bold, Italic]]