I have simple graph I am trying to explore to see how I can control various properties of a TreeGraph. For example, within the following function call, I have found out how to color individual vertices, control their size, and controlled the vertex shape and size:
t2 = TreeGraph[{Style[1, Green], Style[2, Blue], Style[3, Yellow],
Style[4, Orange]}, {1 \[DirectedEdge] 2, 1 \[DirectedEdge] 3,
1 \[DirectedEdge] 4},
VertexCoordinates -> {{.7, .5}, {0, 0}, {.6, 0}, {2.5, 0}},
VertexLabelStyle -> 18, VertexLabels -> Placed["Name", "Center"],
VertexShapeFunction -> {1 -> "Square", 2 -> "Triangle",
3 -> "Circle", 4 -> "Pentagon"},
VertexSize -> {1 -> 0.2, 2 -> 0.5, 3 -> 0.3, 4 -> 0.1}]
However, I have yet to figure out how to: 1) color each individual edge with a color of my choice, 2) control the thickness for each individual edge,
- color each individual edge with a color of my choice
- control the thickness of each individual edge
- control the type, size, and position of the arrowhead, so that it is not obscured when the vertices are made large
It seems that in Ver. 12, EdgeStyle has been depreciated and its functionality is said to be replaced by EdgeShapeFunction.
However, when I try to include the following option:
EdgeShapeFunction -> {{{1 \[DirectedEdge] 2}, Blue}, {{1 \[DirectedEdge] 3},
Yellow}, {{1 \[DirectedEdge] 4}, Orange}}
the system does not return a graphic, but rather a symbolic "System`Graph", with a vertex count of 4, and edge count of 3, identifying the graph as a direct graph, but strangely stating that the Connected Graph: [False] and Acyclic graph: [False], when in fact both properties are true for this simple tree.
Likewise, specifying the option:
VertexLabels-> Placed["Name","Center"]
among those already present, butno VertexLabels appear centered within the vertex, as expected, despite its inclusion.
How does one specify the EdgeShapeFunction to gain this additional functionality and added control in version 12?
The examples given in the documentation for EdgeShapeFunction seems to need a few more comprehensive examples for low level property control.
Graph
) You'd need to show me a complete example (one-liner please) to trigger this before I can tell you why it happens. $\endgroup$