Add Facet Grid Graph Plotting

Follow-up idea: facet grid graph plotting. Perhaps two options/functions: (1) select different graphs from the graph group (different coordinates on different axes), (2) plot the same graph with different drawing kwargs.

A specific example came up in !212 (merged):

  • @herdeanu started a discussion: (+3 comments)

    A quick question: I sometimes need to calculate the length-sorted connected components of one or many graphs (e.g. multiple time steps). I create them using this meta-configuration (not yet very elegant). It returns an xr.DataArray of the connected components of one graph.

    calculate_connected_components:
        transform:
            - operation: callattr
              args: [!arg 0]
              kwargs: 
                attr: create_graph
                at_time_idx: !kwarg at_time_idx
            - operation: import_and_call
              args: [networkx, connected_components, !dag_prev ]
              tag: cc_generator
            - lambda: "lambda x: sorted(x, key=len, reverse=True)"
            - call: [!dag_prev , !dag_tag cc_generator]
              tag: cc
            - lambda: "lambda cc: [len(s) for s in cc]"
            - call: [!dag_prev , !dag_tag cc]
            - xr.DataArray: !dag_prev

    Do I understand it correctly that with the new interface it would be possible to easily visualize at least the biggest component of a graph or alternatively all the components as single frames if I pass the resulting xr.DatArray on to the new plot function?

    It would be really nice, if in the follow-up (FacetGrid) the interface would allow to plot the n biggest connected components column (row)-wise. :) Do you think that this would be possible to integrate @jeremiastraub ? :)