Commit f1540480 authored by Adam Paquette's avatar Adam Paquette
Browse files

Added docstrings to new methods for graphing the clusters.

parent 97e07029
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -571,6 +571,21 @@ class CandidateGraph(nx.Graph):
        return plot_graph(self, ax=ax, **kwargs)

    def plot_cluster(self, ax=None, **kwargs):
        """
        Plot the graph based on the clusters generated by
        the markov clustering algorithm

        Parameters
        ----------
        ax : object
             A MatPlotLib axes object.

        Returns
        -------
        ax : object
             A MatPlotLib axes object.

        """
        return cluster_plot(self, ax, **kwargs)

    def create_edge_subgraph(self, edges):
+11 −5
Original line number Diff line number Diff line
@@ -275,16 +275,22 @@ def plot_edge(edge, ax=None, clean_keys=[], image_space=100,

def cluster_plot(graph, ax=None, cmap='Spectral'):
    """

    Parameters
    ----------
    graph
    ax
    cmap
    graph : object
            A networkX or derived graph object

    ax : object
         A MatPlotLib axes object

    cmap : str
           A MatPlotLib color map string. Default 'Spectral'

    Returns
    -------

    ax : object
         A MatPlotLib axes object that was either passed in
         or a new axes object
    """
    if ax is None:
        ax = plt.gca()