Loading autocnet/graph/network.py +15 −0 Original line number Diff line number Diff line Loading @@ -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): Loading autocnet/vis/graph_view.py +11 −5 Original line number Diff line number Diff line Loading @@ -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() Loading Loading
autocnet/graph/network.py +15 −0 Original line number Diff line number Diff line Loading @@ -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): Loading
autocnet/vis/graph_view.py +11 −5 Original line number Diff line number Diff line Loading @@ -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() Loading