You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I'm excited to have found this package and I'm hoping to try it out soon. Thanks for building it!
What is the expected enhancement?
In networkx it is possible to get the coordinates of a graphviz-provided layout without actually drawing the graph. This is nice because it provides access to the algorithms (e.g. sfdp) without constraining the user to their display methods. I typically use nx.nx_agraph.graphviz_layout to get coordinates for a graph and then plot the resulting graph with matplotlib where I have better control over the display options (if only because I'm more familiar with the API).
I found #280 which is somewhat related to this. In that issue the decision was to not re-implement the algorithms (makes sense) but leave the layout interface entirely within the drawing code.
It looks like the interface with graphviz is via python, so maybe this is as simple as copying emulating the code in networkx.nx_agraph?
The text was updated successfully, but these errors were encountered:
Yeah, I like this idea it was something I was recently discussing in a Qiskit PR that was leveraging graphviz_draw() (see: Qiskit/qiskit#10208). Yeah we can use use similar code to networkx.nx_agraph with an appropriately documented optional dependency on pygraphviz. The other option would be to just call graphviz with subprocess and use the json output (or some other raw text format) and parse the layout information from that. I guess it really depends on whether we need the full pygraphviz representation or not.
The other option would be to just call graphviz with subprocess and use the json output (or some other raw text format) and parse the layout information from that.
I don't love this version because of the overhead of writing/reading the data. Unless graphviz can deal with streams?
First off, I'm excited to have found this package and I'm hoping to try it out soon. Thanks for building it!
What is the expected enhancement?
In
networkx
it is possible to get the coordinates of a graphviz-provided layout without actually drawing the graph. This is nice because it provides access to the algorithms (e.g.sfdp
) without constraining the user to their display methods. I typically usenx.nx_agraph.graphviz_layout
to get coordinates for a graph and then plot the resulting graph withmatplotlib
where I have better control over the display options (if only because I'm more familiar with the API).I found #280 which is somewhat related to this. In that issue the decision was to not re-implement the algorithms (makes sense) but leave the layout interface entirely within the drawing code.
It looks like the interface with graphviz is via python, so maybe this is as simple as
copyingemulating the code innetworkx.nx_agraph
?The text was updated successfully, but these errors were encountered: