-
Notifications
You must be signed in to change notification settings - Fork 23
adding fixed locations to SFDP - update #52
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
Conversation
I would love to use this! I wonder though if the interface could be designed to allow greater flexibility in what to "fix": e.g., it might be nice to be able to fix just a single coordinate of a node (i.e. x or y coordinate) in addition to specifying both coordinates simultaneously.
|
In the current implementation, and in the suggested change where pinning is done via a variable |
I was thinking that the vertex iterator of the graph and Without the norm_force = norm(force)
if !isnothing(algo.pin)
locs[i] += (!).(algo.pin[i]) .* (force * (step/norm_force))
else
locs[i] += force * (step/norm_force)
end If we allow |
Tangentially, it would be nice to add this functionality to |
I'd also really prefere to find a nice interface which could be added to all the interative layouts. I am not plotting that many graphs nowadays but when i wanted to use this feature I was allways thinking of an dict based interface. Something like |
@hexaeder I like your interface improvement suggestion. I'd suggest that the same interface should be used for |
I think there is an important usage difference between However, as long as it is non-breaking it would be cool if struct Spdf{..., IPT} where {IPT <: Union{Dict, Vector}}
initialpos::IPT
end
# and during construction
startpos = rand(N)
for (k,v) in pairs(algo.initialpos)
startpos[k] = v
end [1] The fact that you may specify the first |
fa63d4c
to
675af4a
Compare
This latest attempt gets most of the way towards the suggestions from @hexaeder
I don't think this quite meets all the requests. And it's not the cleanest implementation, but I've spent too much time on this now and I have to put it down. |
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
==========================================
- Coverage 97.44% 96.76% -0.68%
==========================================
Files 8 8
Lines 470 526 +56
==========================================
+ Hits 458 509 +51
- Misses 12 17 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
closed by #53 |
this is a redo on #29 based on v0.4