Improve Graph Plotting

What does this MR do?

This MR improves the draw_graph function used for graph plotting. For details, see #192 (closed).

Changes that might cause existing code to fail:

  • removed the graph_cfg configuration layer
  • rename: select.nodes -> select.nodelist
  • select.radial is no longer needed, can just be omitted
  • nodes.colorbar and edges.colorbar is now nodes.colorbar.enabled and edges.colorbar.enabled
  • and even more ...

Is there something that needs to be double checked?

Test that the graph plots look nice.

Also, not all of the features are tested. This is difficult because (a) the tests are based on the output of the CopyMeGraph only and (b) a lot of the functionality needs to be checked by looking at the plots. So these things just have to be tried out. Surely, there will be more smaller issues arising here and there when the plot function is being used...

Can this MR be accepted?

  • Implemented the changes
    • Implemented mark feature
    • Allow loading of external data (dantro#145 (closed), after integration of dantro v0.13. into utopia) (moved to !158 (merged))
    • Implemented select.open_edges feature: The size of the "outer nodes" is set to zero
    • Allow passing kwargs to the colorbar and allow for specifying a discrete colormap
    • Allow calculating node positions based on the selected nodes (should become default): Added select.drop=True; if true, non-selected nodes are removed from the graph object
    • Allow setting suptitle needs to be done in dantro#153 (closed)
    • Implement ColorHandler
    • Integrate ColorHandler in draw_graph; todo (done): manually applying norm and cmap
  • Added or extended tests
    • test some more parameter combinations. However, there's too many to test everything..
    • Extend ColorHandler tests
    • Test different color-mapping scenarios by looking at the plots
  • Checked test code coverage on new and adjusted code (94%)
  • Added or updated documentation
  • Reasonably up-to-date with current master
  • Pipeline passing without warnings
  • Squash option set
  • Approved by @blsqr

Related issues

Closes #192 (closed)

Edited by Utopia Developers

Merge request reports

Loading