Using the igraph
package in R, I've come upon the following unexpected behavior. If the edge.arrow.mode
for a graph (in my case undirected, but it makes no difference) is specified as 3
(or "<->"
, arrows on both ends), and the edge.color is specified as rgb()
with option alpha < 1
, the arrows become differentially colored. It looks like there are two arrowheads on one end, and the overlap creates a darker color.
This is undesirable, since it makes the graph show some arrows as darker (looking more "important") than others. The actual graph I'm trying to visualize is undirected, the arrows on the ends of (all gray, semi-transparent) edges would be just used to illustrate how many connections a particular vertex has (the graph is quite large (100-500 vertices), with overlapping edges, so it's not easy to determine visually where an edge connects to a vertex; this also being the reason to use semi-transparent edges and vertices).
Here are some working examples:
library("igraph")
plot(make_tree(5, mode="undirected"), vertex.size=10, edge.arrow.mode=3, edge.color=rgb(0,0,0,0.2))
plot(make_tree(5, mode="undirected"), vertex.size=10, edge.arrow.mode=3, edge.color=rainbow(5, alpha=0.3))
The question is, is there a way around this, so the arrows would look all the same?
Displaying the number (and preferrably, the "direction") of the connections of the vertices visually some other way could also be considered (but note that vertex color (full color spectrum) is already used for another visual aid, and vertex edge coloring on top of that would make things too rainbow'sy). Changing the vertex shape to indicated the degree of connectedness is not a good solution either (edit - thanks to Tad). Making all arrowheads a solid color would be all right as well (but there does not seem to be a way to change arrow color separately from the edge color).
(Bonus: is this a bug or a feature of igraph?)