cdlib.viz.plot_com_stat¶
- cdlib.viz.plot_com_stat(com_clusters: list, com_fitness: Callable[[object, object, bool], object]) object ¶
Plot the distribution of a property among all communities for a clustering, or a list of clusterings (violin-plots)
- Parameters:
com_clusters – list of clusterings to compare, or a single clustering
com_fitness – the fitness/community property to use
- Returns:
the violin-plots
Example:
>>> from cdlib import algorithms, viz, evaluation >>> import networkx as nx >>> g = nx.karate_club_graph() >>> coms = algorithms.louvain(g) >>> coms2 = algorithms.walktrap(g) >>> violinplot = viz.plot_com_stat([coms,coms2],evaluation.size)