Change plotting._plot_panel() to retrieve the node
list and colors for each individual plot so the flux
diagrams are properly colored when cbt=True
Add test test_color_by_target to check the
flux diagrams are appropriately assigning target
nodes. Also check if _get_node_colors() is
returning the correct colors for each flux diagram.
Change _get_node_labels() to return integers
for all cases, and simplify.
This probably slows down some of the panel plotting since every diagram has to retrieve its own nodes and colors now. But correctness trumps performance, so this is fine. Merging.
Description
Change
plotting._plot_panel()
to retrieve the node list and colors for each individual plot so the flux diagrams are properly colored whencbt=True
Add test
test_color_by_target
to check the flux diagrams are appropriately assigning target nodes. Also check if_get_node_colors()
is returning the correct colors for each flux diagram.Change
_get_node_labels()
to return integers for all cases, and simplify.