Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

I know of two methods to produce a fixed vertex size.

Scaled

Use Scaled for VertexSize and set AspectRatio -> 1:

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
    VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexSize -> Scaled[{0.1, 0.1}], 
   AspectRatio -> 1];

enter image description here

Offset

As demonstrated in How can I specify the arrowhead size in printers points?How can I specify the arrowhead size in printers points? if you construct a Graphics expression using Offset coordinates it will be rendered at a fixed size.

vf[xy_, _, _] := {Red, Rectangle[Offset[{-1, -1} 15, xy], Offset[{1, 1} 15, xy]]}

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
   VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexShapeFunction -> vf];

enter image description here

I know of two methods to produce a fixed vertex size.

Scaled

Use Scaled for VertexSize and set AspectRatio -> 1:

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
    VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexSize -> Scaled[{0.1, 0.1}], 
   AspectRatio -> 1];

enter image description here

Offset

As demonstrated in How can I specify the arrowhead size in printers points? if you construct a Graphics expression using Offset coordinates it will be rendered at a fixed size.

vf[xy_, _, _] := {Red, Rectangle[Offset[{-1, -1} 15, xy], Offset[{1, 1} 15, xy]]}

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
   VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexShapeFunction -> vf];

enter image description here

I know of two methods to produce a fixed vertex size.

Scaled

Use Scaled for VertexSize and set AspectRatio -> 1:

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
    VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexSize -> Scaled[{0.1, 0.1}], 
   AspectRatio -> 1];

enter image description here

Offset

As demonstrated in How can I specify the arrowhead size in printers points? if you construct a Graphics expression using Offset coordinates it will be rendered at a fixed size.

vf[xy_, _, _] := {Red, Rectangle[Offset[{-1, -1} 15, xy], Offset[{1, 1} 15, xy]]}

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
   VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexShapeFunction -> vf];

enter image description here

Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

I know of two methods to produce a fixed vertex size.

Scaled

Use Scaled for VertexSize and set AspectRatio -> 1:

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
    VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexSize -> Scaled[{0.1, 0.1}], 
   AspectRatio -> 1];

enter image description here

Offset

As demonstrated in How can I specify the arrowhead size in printers points? if you construct a Graphics expression using Offset coordinates it will be rendered at a fixed size.

vf[xy_, _, _] := {Red, Rectangle[Offset[{-1, -1} 15, xy], Offset[{1, 1} 15, xy]]}

options = Sequence[VertexStyle -> Black, VertexLabels -> Placed["Name", {Center, Center}],
   VertexLabelStyle -> Directive[16, White], GraphLayout -> "CircularEmbedding", 
   EdgeShapeFunction -> ef2, ImageSize -> 400, VertexShapeFunction -> vf];

enter image description here