Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Make a weighted connectivity graph using circular embedding
ResourceFunction["ChordDiagram"][graph] generates a chord diagram using a weighted graph. |
| "Labels" | Automatic | choose the vertex labels |
| "Colors" | Automatic | choose the ribbon colors for each edge |
| "BackgroundOpacity" | 0.25 | set the background ribbon opacity |
| "Interactive" | False | include interactive mouseover |
| "TrimEdges" | 0 | trim edges with small weights |
A chord diagram with simple weighted graph:
| In[1]:= |
| Out[1]= | ![]() |
By default, ChordDiagram uses VertexList as labels:
| In[2]:= |
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= | ![]() |
Use an explicit list of strings to overwrite this:
| In[5]:= |
| Out[5]= | ![]() |
For realistic datasets, many edges may suffer from small weights:
| In[6]:= |
| Out[6]= | ![]() |
Use TrimEdges to drop the lowest edge weights:
| In[7]:= |
| Out[7]= | ![]() |
Add basic interactivity using mouseovers:
| In[8]:= |
| Out[8]= | ![]() |
Using a directed graph to show asymmetric ribbon widths:
| In[9]:= |
Add custom colors and labels:
| In[10]:= | ![]() |
| In[11]:= |
| Out[11]= | ![]() |
By default, the function accepts a weighted graph. If you instead have a weighted adjacency matrix, this can be converted to a weighted graph first:
| Out[25]= | ![]() |
| In[26]:= |
| In[27]:= |
| Out[27]= | ![]() |
| In[28]:= |
| Out[28]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License