WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

CommunityGraphPlot [g]

generates a plot showing the community structure of the graph g.

CommunityGraphPlot [g,{{vi1,vi2,},}]

generates a plot for the graph g with communities {vi1,vi2,}, .

CommunityGraphPlot [g,{,wj[{vi1,}],}]

generates a plot with highlighting features defined by the symbol wrappers wj.

CommunityGraphPlot [{vi1vj1,vi2vj2,},]

generates a plot for a graph in which vertex vik is connected to vertex vjk.

CommunityGraphPlot [m,]

generates a plot for a graph represented by the adjacency matrix m.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
AspectRatio  
CommunityBoundaryStyle  
CommunityLabels  
CommunityRegionStyle  
Method  
PlotLegends  
See Also
Related Guides
Related Links
History
Cite this Page

CommunityGraphPlot [g]

generates a plot showing the community structure of the graph g.

CommunityGraphPlot [g,{{vi1,vi2,},}]

generates a plot for the graph g with communities {vi1,vi2,}, .

CommunityGraphPlot [g,{,wj[{vi1,}],}]

generates a plot with highlighting features defined by the symbol wrappers wj.

CommunityGraphPlot [{vi1vj1,vi2vj2,},]

generates a plot for a graph in which vertex vik is connected to vertex vjk.

CommunityGraphPlot [m,]

generates a plot for a graph represented by the adjacency matrix m.

Details and Options

Examples

open all close all

Basic Examples  (2)

Show communities in a graph:

Find communities:

Show the communities:

Scope  (8)

CommunityGraphPlot works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

Specify a graph using a rule list:

Adjacency matrix:

Specify communities:

Wrappers:

Options  (17)

AspectRatio  (2)

By default, CommunityGraphPlot automatically determines the height to width ratio for the plot:

Make the height the same as the width with AspectRatio 1:

CommunityBoundaryStyle  (4)

The default community boundary style is a gray line:

Use black boundary lines:

Use None to not show boundary lines:

Alternate between red and dashed boundary lines:

CommunityLabels  (3)

Generate labels for communities:

Use Labeled to specify individual labels:

Use Placed to control the placement of labels:

CommunityRegionStyle  (3)

The default community region style is None :

This can also be obtained with CommunityRegionStyle->None :

Use green colors on community regions:

Alternate between red and blue colors on community regions:

Method  (2)

By default, CommunityGraphPlot uses a force-directed layout:

This can also be obtained with Method->"SpringElectrical":

Use Method->"Hierarchical" for a hierarchical layout:

PlotLegends  (3)

Generate a legend for communities:

Use Legended to specify individual legend entries:

Use Placed to control the placement of legends:

Wolfram Research (2012), CommunityGraphPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/CommunityGraphPlot.html.

Text

Wolfram Research (2012), CommunityGraphPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/CommunityGraphPlot.html.

CMS

Wolfram Language. 2012. "CommunityGraphPlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CommunityGraphPlot.html.

APA

Wolfram Language. (2012). CommunityGraphPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CommunityGraphPlot.html

BibTeX

@misc{reference.wolfram_2025_communitygraphplot, author="Wolfram Research", title="{CommunityGraphPlot}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CommunityGraphPlot.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_communitygraphplot, organization={Wolfram Research}, title={CommunityGraphPlot}, year={2012}, url={https://reference.wolfram.com/language/ref/CommunityGraphPlot.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /