JuliaPlots/GraphRecipes.jl

Self-edges not all drawn the same way for Digraph

kkganko opened this issue · 0 comments

Given a simple digraph of n>1 nodes and n self-edges, with or without neighboring node connections, I've noticed that self-edge drawings start inside the node on some nodes, outside the node on others. This is visible when markeralpha < 1.0. Effectively, self-edges drawn inside the node are visually distorted for larger node sizes whereas those self-edges drawn externally are not.

I was able to reproduce this behavior in both gr() and pyplot() backends. What could be causing this behavior, and is there a way around it?

MWE:

using Plots, Graphs, GraphRecipes, LinearAlgebra
pyplot(html_output_format=:png)
# gr(html_output_format=:png)
n = 2
# adjm = ones(Int8,n,n)
adjm = I(n)
p = SimpleDiGraph{UInt64}(adjm)
graphplot(
    p,
    nodealpha = 0.5,
    nodeshape = :circle,
    method = :circular
)

Sample image from Jupyter Notebook:
image