Message Boards Message Boards

GROUPS:

Why are arrowhead sizes diminished in these directed edges?

Posted 1 year ago
1731 Views
|
3 Replies
|
2 Total Likes
|

Occasionally I find the size of directed edge arrowheads in a Graph[] are diminished. How to correct for this?

For example, the arrowheads of directed edges 31[DirectedEdge]261 276[DirectedEdge]198, 261[DirectedEdge]161, 30[DirectedEdge]79 are barely visible in this rendering:

enter image description here

Here's the code that generated it:

componentEdges = {Annotation[
    DirectedEdge[31, 261], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    DirectedEdge[276, 198], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[30, 302], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[238, 265], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[7, 261], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[7, 161], {EdgeLabels -> 2.06, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    DirectedEdge[261, 161], {EdgeLabels -> 2.06, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    DirectedEdge[30, 79], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[66, 239], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[239, 271], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[4/15, 40/51, 4/15]}}], 
   Annotation[
    UndirectedEdge[34, 264], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[58, 271], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[161, 237], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[66, 178], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[161, 240], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[66, 171], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[30, 53], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[None], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[66, 161], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[79, 261], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[30, 31], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[34, 302], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[238, 261], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}], 
   Annotation[
    UndirectedEdge[198, 239], {EdgeLabels -> None, 
     EdgeStyle -> {Dashing[Small], AbsoluteThickness[2], 
       RGBColor[2/15, 40/51, 40/51]}}]};
vertexLabels = {7 -> Placed[7, Automatic], 
   30 -> Placed[30, Automatic], 31 -> Placed[31, Automatic], 
   34 -> Placed[34, Automatic], 53 -> Placed[53, Automatic], 
   58 -> Placed[58, Automatic], 66 -> Placed[66, After], 
   79 -> Placed[79, Automatic], 
   161 -> Placed[Column[{161, "m=2"}, Center, 0], After], 
   171 -> Placed[171, After], 178 -> Placed[178, Automatic], 
   198 -> Placed[198, Automatic], 237 -> Placed[237, Automatic], 
   238 -> Placed[238, Before], 239 -> Placed[239, Automatic], 
   240 -> Placed[240, Automatic], 261 -> Placed[261, Automatic], 
   264 -> Placed[264, Automatic], 265 -> Placed[265, Automatic], 
   271 -> Placed[271, Automatic], 276 -> Placed[276, Automatic], 
   302 -> Placed[302, Automatic]};
vertexCoords = {7 -> {1.6956, 2.3874}, 30 -> {0., 1.7905}, 
   31 -> {-0.3391, 2.3874}, 34 -> {-0.3391, 0.5968}, 
   53 -> {0.3391, 1.1937}, 58 -> {2.0347, 0.}, 66 -> {2.3738, 1.7905},
    79 -> {0.3391, 2.3874}, 161 -> {3.052, 2.3874}, 
   171 -> {3.052, 1.1937}, 178 -> {2.3738, 1.1937}, 
   198 -> {1.3565, 0.5968}, 237 -> {3.052, 1.7905}, 
   238 -> {1.0173, 2.3874}, 239 -> {1.6956, 1.1937}, 
   240 -> {3.7303, 1.7905}, 261 -> {1.6956, 2.9842}, 
   264 -> {-0.3391, 0.}, 265 -> {1.0173, 1.7905}, 
   271 -> {2.0347, 0.5968}, 276 -> {1.3565, 0.}, 
   302 -> {-0.3391, 1.1937}};
exampleG = Graph[
   componentEdges,
   EdgeLabels -> Automatic,
   VertexCoordinates -> vertexCoords,
   VertexSize -> {0.035, 0.035},
   VertexStyle -> Black,
   VertexLabels -> vertexLabels,
   VertexLabelStyle -> {Black, 12},
   PlotLabel -> None,
   GraphLayout -> "LayeredEmbedding",
   AspectRatio -> 4/5,
   ImageSize -> {672/2.25, Automatic}
   ];
Print[exampleG];
POSTED BY: Richard Frost
3 Replies

Your arrows are too small compared with the thickness of the edges. Try this option in Graph:

BaseStyle -> Arrowheads[.05]
POSTED BY: Gianluca Gorni

Not that I know of. Someone from Wolfram may comment on this.

POSTED BY: Gianluca Gorni

Thank you Gianluca, I have implemented this in Graph[] as

EdgeStyle -> Arrowheads[.05]

I notice this is a scaled value, which must be tinkered with for each graph. Is there a means of setting an absolute size, e.g. in printers points?

Is there also a means to specify an absolute (non-scaled) size for VertexSize?

POSTED BY: Richard Frost
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract