Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-edges not all drawn the same way for Digraph #190

Open
kkganko opened this issue Dec 3, 2022 · 0 comments
Open

Self-edges not all drawn the same way for Digraph #190

kkganko opened this issue Dec 3, 2022 · 0 comments

Comments

@kkganko
Copy link

kkganko commented Dec 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant