I defined an option to draw nicely the graph. But I have a problem with the different size obtained. For example, the layout of the first graph is what I want to have for all other graphs I will define later. But for smaller graphs, their vertices look biger and biger. It seems that there is a way to control this using Scale
, but I don't want to adjust this for each graph I will have.
Is there a way to specify the size of vertices and edges once for all?
ef2[el_, ___] := {RGBColor[0, 0, 1], Thickness[1/200], Arrowheads[1/16], Arrow[el, 0.2]}
options = Sequence[VertexStyle -> Black, VertexSize -> 1/2,
VertexLabels -> Placed["Name", {Center, Center}], VertexLabelStyle -> Directive[16, White],
GraphLayout -> "CircularEmbedding", EdgeShapeFunction -> ef2, ImageSize -> 400];
g = Graph[{1 -> 2, 2 -> 7, 8 -> 7, 3 -> 4, 5 -> 6, 5 -> 9}, options]
g = Graph[{1 -> 2, 2 -> 7, 3 -> 7, 3 -> 1, 5 -> 6, 5 -> 9}, options]
g = Graph[{1 -> 2, 2 -> 7, 3 -> 7}, options]
g = Graph[{1 -> 2}, options]