-
Notifications
You must be signed in to change notification settings - Fork 62
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
Bad displays #190
Comments
Thanks for pointing these out. #186 will allow you to make a plot like the first one with straight edges for the non-self loops, and curved edges for the self loops. The cut out can be fixed in the PR as well because you can add margins to ensure the curved edges are fully shown. However, the edge labels on curved edges don't work as expected. Thanks for pointing this out. I'll see if we can get curved edge labels to work. |
I just stumbled upon GraphMakie.jl, which seems to be more actively developed and has better support for curved edges. Here is your example in GraphMakie using Graphs, GraphMakie, CairoMakie
B = [3 7; 2 4]
g = SimpleDiGraph(B)
graphplot(g,
layout = g -> [Point(-1,0), Point(1,0)],
nlabels = string.("node ",1:nv(g)),
elabels = string.([B[src(e),dst(e)] for e in edges(g)]),
elabels_rotation=0,
arrow_shift=0.99,
curve_distance = 0.1,
selfedge_size=1,
selfedge_width=pi/9
) You can of course do much more customization on the appearance if you want. Now the edge labels will be in the right place. |
@hdavid16 Thanks you I'll give a try. |
@Lecrapouille, I've added a commit to the PR #186 that will produce the following. This should fix the bug on the edge labels for curved edges. B = [3 7; 2 4]
g = SimpleDiGraph(B)
gplot(g, [-1.,1.], [0.,0.],
nodelabel=1:nv(g),
edgelabel=B,
linetype="curve",
EDGELINEWIDTH=1,
outangle=-pi/3,
pad=5mm
) |
Hi ! Again to disturb you. Here is my matrix:
Which corresponds to the expected network.
The following code
gives me:
Issues are:
Based on #160 The following code
gives me:
There are:
I dunno if #186 will fix this simple graph.
The text was updated successfully, but these errors were encountered: