-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Improvements to graph plotting #1140
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vyudu, feel free to merge after addressing my comments.
@@ -14,13 +14,13 @@ Wrapper intended to allow plotting of multiple edges. This is needed in the foll | |||
struct MultiGraphWrap{T} <: Graphs.AbstractGraph{T} | |||
g::SimpleDiGraph{T} | |||
multiedges::Vector{Graphs.SimpleEdge{T}} | |||
edgeorder::Vector{Int64} | |||
edgeorder::Vector{Int64} # sets the drawing order of the edges. Needed because multiedges need to be consecutive to be drawn properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edgeorder::Vector{Int64} # sets the drawing order of the edges. Needed because multiedges need to be consecutive to be drawn properly. | |
"""sets the drawing order of the edges. Needed because multiedges need to be consecutive to be drawn properly.""" | |
edgeorder::Vector{Int64} |
# Return the multigraph and reaction order corresponding to the complex graph. The reaction order is the order of reactions(rn) that would match the edge order given by g.edgeorder. | ||
function ComplexGraphWrap(rn::ReactionSystem) | ||
img = incidencematgraph(rn); D = incidencemat(rn; sparse=true) | ||
specs = species(rn); rxs = reactions(rn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specs = species(rn); rxs = reactions(rn) | |
specs = species(rn) | |
rxs = reactions(rn) |
Using
Stress()
by default (if connected) to reduce edge crossings, adding support for kwargs, refactoring some code. Graph comparison below (after/before)