-
Notifications
You must be signed in to change notification settings - Fork 29
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
Layout mechanism in drawing #28
Comments
One thought I've had here is to interface with GraphPlot. Currently it requires LightGraphs but perhaps one could generalize it. One of the easiest ways might be to export an adjacency matrix like struct AdjacencyMatrix{G<:AbstractGraph} <: AbstractMatrix{Bool}
g::G
end
Base.size(A::AdjacencyMatrix) = (n = nodecount(A.g); return (n, n))
Base.getindex(A::AdjacencyMatrix, i::Int, j::Int) = hasedge(A.g, i, j) and then modify GraphPlot to accept an adjacency matrix. You'd also need to supply node labels, but the package already looks like it supports that. Trickier would be double & triple bonds, but again that could probably be implemented there. |
Now that I think about it, for chemical graphs it may not make a lot of sense, because there are bond-angle constraints that it would be nice to respect. This idea came up for me more in the context of #42, trying to understand the nature of the graph (by visualization) constructed by that call to |
The text was updated successfully, but these errors were encountered: