Menu

Diagrams
Static
41 Python scripts generated for non-ribbon chord diagram this week

Non-ribbon Chord Diagram

Chart overview

Non-ribbon chord diagrams arrange nodes in a circle and connect them with simple lines instead of width-varying ribbons.

Key points

  • This variant works well when connection strength is less important than the existence of connections, common in biological and social network analysis.
  • Dropping the ribbon width is a deliberate trade: you gain a clean view of which nodes connect (topology) and lose the ability to compare edge magnitudes, so reach for it when the data is binary or near-binary adjacency - gene-gene interactions, co-authorship, shared-membership - and use a full ribbon chord diagram when flow volume is the point.
  • The circular layout's strength is that every node is equally visible on the rim; its weakness is that edges cross through the middle and become a hairball past roughly 30 nodes or a few hundred edges.

Practical guidance

Two standard mitigations: order nodes around the circle to minimize crossings (group by cluster or community, not alphabetically) so related connections stay as short arcs, and bundle edges toward the center (hierarchical edge bundling) to turn a mess of straight chords into legible curved cables. In Python, networkx computes a circular_layout and community structure for coloring; drawing bundled arcs usually means Bezier curves toward the centroid. If node degree or a per-node metric matters, size or color the rim segments. When the graph is large or the exact wiring matters more than the circular aesthetic, a force-directed node-link layout or an adjacency matrix will read more clearly.

Create a Non-ribbon Chord Diagram with your data using AI — no coding required.

Python Tutorial

How to create a non-ribbon chord diagram in Python

Use the full tutorial for implementation details, troubleshooting, and chart variations in matplotlib, seaborn, and plotly.

Complete Guide to Scientific Data Visualization

Example Visualization

Circular network diagram showing gene interactions

Create This Chart Now

Generate publication-ready non-ribbon chord diagrams with AI in seconds. No coding required – just describe your data and let AI do the work.

View example prompt
Example AI Prompt

"Create a circular network diagram (non-ribbon chord diagram) showing 'Gene Interaction Network' for 15 genes involved in a biological pathway. Generate realistic gene interaction data: each gene (TP53, BRCA1, EGFR, MYC, KRAS, etc.) with 2-5 connections representing protein-protein interactions. Position genes in a circle using their pathway order. Draw straight lines between interacting genes. Line color by interaction type: activation (green), inhibition (red), binding (blue). Line thickness by confidence score (0.5-1.0). Node size by number of connections (degree). Label each gene node. Highlight hub genes (>4 connections) with a larger marker. Include a legend for interaction types."

How to create this chart in 30 seconds

1

Upload Data

Drag & drop your Excel or CSV file. Plotivy securely processes it in your browser.

2

AI Generation

Our AI analyzes your data and generates the Non-ribbon Chord Diagram code automatically.

3

Customize & Export

Tweak the design with natural language, then export as high-res PNG, SVG or PDF.

Newsletter

Get one weekly tip for better non-ribbon chord diagrams

Join researchers receiving concise Python plotting techniques to improve chart clarity and reduce revision cycles.

No spam. Unsubscribe anytime.

Python Code Example

example.py
# === IMPORTS ===
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
from matplotlib.patches import Arc, FancyArrowPatch
import matplotlib.patheffects as pe

# === USER-EDITABLE PARAMETERS ===
title = "Gene Regulatory Network — Circular Layout"
figsize = (14, 14)

# === EXAMPLE DATASET ===
# Gene names and pathway involvement
genes = [
    ('TP53', 'Tumor Suppressor'),
    ('BRCA1', 'DNA Repair'),
    ('EGFR', 'Growth Factor'),
    ('MYC', 'Transcription Factor'),
    ('KRAS', 'Signal Transduction'),
    ('AKT1', 'Cell Survival'),
    ('PIK3CA', 'Signal Transduction'),
    ('PTEN', 'Tumor Suppressor'),
    ('RB1', 'Cell Cycle'),
    ('CDK4', 'Cell Cycle'),
    ('CDKN2A', 'Tumor Suppressor'),
    ('MDM2', 'P53 Regulation'),
]

# Interactions: (gene1, gene2, type, confidence)
interactions = [
    ('TP53', 'MDM2', 'inhibition', 0.97),
    ('MDM2', 'TP53', 'inhibition', 0.95),
    ('TP53', 'CDKN2A', 'activation', 0.88),
    ('BRCA1', 'TP53', 'binding', 0.92),
    ('BRCA1', 'RB1', 'binding', 0.78),
    ('EGFR', 'PIK3CA', 'activation', 0.94),
    ('EGFR', 'KRAS', 'activation', 0.91),
    ('MYC', 'CDK4', 'activation', 0.87),
    ('KRAS', 'PIK3CA', 'activation', 0.89),
    ('AKT1', 'PTEN', 'inhibition', 0.93),
    ('PIK3CA', 'AKT1', 'activation', 0.96),
    ('PTEN', 'PIK3CA', 'inhibition', 0.91),
    ('RB1', 'CDK4', 'inhibition', 0.90),
    ('CDK4', 'RB1', 'inhibition', 0.88),
    ('CDKN2A', 'CDK4', 'inhibition', 0.92),
]

# Create graph
G = nx.DiGraph()
for gene, pathway in genes:
    G.add_node(gene, pathway=pathway)

for gene1, gene2, int_type, conf in interactions:
    G.add_edge(gene1, gene2, type=int_type, confidence=conf)

# Print summary
print("=== Gene Regulatory Network ===")
print(f"\nGenes: {len(genes)}")
print(f"Interactions: {len(interactions)}")
print(f"\nHub genes (degree > 3):")
degrees = dict(G.degree())
for gene, degree in sorted(degrees.items(), key=lambda x: x[1], reverse=True):
    if degree > 3:
        print(f"  {gene}: {degree} connections")

# === CREATE CIRCULAR NETWORK DIAGRAM ===
fig, ax = plt.subplots(figsize=figsize, facecolor='#0d1117')
ax.set_facecolor('#0d1117')

# Circular layout
pos = nx.circular_layout(G)

# Pathway colors
pathway_colors = {
    'Tumor Suppressor': '#FF6B6B',
    'DNA Repair': '#4ECDC4',
    'Growth Factor': '#45B7D1',
    'Transcription Factor': '#96CEB4',
    'Signal Transduction': '#FFEAA7',
    'Cell Survival': '#DDA0DD',
    'Cell Cycle': '#98D8C8',
    'P53 Regulation': '#F7DC6F'
}

# Edge colors by interaction type
edge_color_map = {
    'activation': '#00E676',
    'inhibition': '#FF5252',
    'binding': '#448AFF'
}

# Draw curved edges
for gene1, gene2, data in G.edges(data=True):
    x1, y1 = pos[gene1]
    x2, y2 = pos[gene2]
    
    color = edge_color_map[data['type']]
    width = data['confidence'] * 3
    
    # Create curved arrow
    style = "arc3,rad=0.2"
    arrow = FancyArrowPatch(
        (x1, y1), (x2, y2),
        connectionstyle=style,
        arrowstyle='-|>',
        mutation_scale=15,
        color=color,
        linewidth=width,
        alpha=0.7
    )
    ax.add_patch(arrow)

# Draw nodes with glow
for gene, pathway in genes:
    x, y = pos[gene]
    color = pathway_colors[pathway]
    size = degrees[gene] * 80 + 200
    
    # Glow effect
    for i in range(4, 0, -1):
        circle = plt.Circle((x, y), 0.08 * i, color=color, alpha=0.05)
        ax.add_patch(circle)
    
    # Main node
    ax.scatter(x, y, s=size, c=color, edgecolors='white', 
               linewidths=2, zorder=10, alpha=0.95)

# Draw labels
label_offset = 0.15
for gene, _ in genes:
    x, y = pos[gene]
    # Position label outside the circle
    angle = np.arctan2(y, x)
    lx = x + label_offset * np.cos(angle)
    ly = y + label_offset * np.sin(angle)
    
    rotation = np.degrees(angle)
    if rotation > 90:
        rotation -= 180
    elif rotation < -90:
        rotation += 180
    
    ax.text(lx, ly, gene, fontsize=11, fontweight='bold',
            ha='center', va='center', color='white',
            rotation=rotation,
            path_effects=[pe.withStroke(linewidth=3, foreground='#0d1117')])

# Legend for edge types
from matplotlib.lines import Line2D
edge_legend = [
    Line2D([0], [0], color='#00E676', linewidth=3, label='Activation →'),
    Line2D([0], [0], color='#FF5252', linewidth=3, label='Inhibition ⊣'),
    Line2D([0], [0], color='#448AFF', linewidth=3, label='Binding â—‹'),
]
legend1 = ax.legend(handles=edge_legend, loc='upper left', 
                    facecolor='#161b22', edgecolor='#30363d',
                    labelcolor='white', fontsize=10, title='Interaction Type',
                    title_fontsize=11)
legend1.get_title().set_color('white')

# Legend for pathways
from matplotlib.patches import Patch
pathway_legend = [
    Patch(facecolor=color, label=pathway, edgecolor='white')
    for pathway, color in list(pathway_colors.items())[:6]
]
legend2 = ax.legend(handles=pathway_legend, loc='upper right',
                    facecolor='#161b22', edgecolor='#30363d',
                    labelcolor='white', fontsize=9, title='Pathway',
                    title_fontsize=10)
legend2.get_title().set_color('white')
ax.add_artist(legend1)

# Title
ax.set_title(title, fontsize=22, fontweight='bold', color='white', pad=20,
             path_effects=[pe.withStroke(linewidth=3, foreground='#238636')])

ax.set_xlim(-1.5, 1.5)
ax.set_ylim(-1.5, 1.5)
ax.set_aspect('equal')
ax.axis('off')

plt.tight_layout()
plt.savefig('chart.png', dpi=150, bbox_inches='tight', facecolor='#0d1117')
print("Saved: chart.png")
plt.show()
# END-OF-CODE

Opens the Analyze page with this code pre-loaded and ready to execute

Console Output

Output
=== Gene Regulatory Network ===

Genes: 12
Interactions: 15

Hub genes (degree > 3):
  TP53: 4 connections
  PIK3CA: 4 connections
  CDK4: 4 connections
Saved: chart.png

Common Use Cases

  • 1Gene interaction networks
  • 2Protein-protein interactions
  • 3Simple relationship mapping
  • 4Communication patterns

Pro Tips

Order nodes to minimize crossings

Use edge bundling for many connections

Color edges by relationship type

Frequently asked questions

When should you use a non-ribbon chord diagram?

Non-ribbon chord diagrams arrange nodes in a circle and connect them with simple lines instead of width-varying ribbons. This variant works well when connection strength is less important than the existence of connections, common in biological and social network analysis. Common applications include gene interaction networks, protein-protein interactions, and simple relationship mapping.

Which Python libraries can create a non-ribbon chord diagram?

A non-ribbon chord diagram can be built in Python with networkx — networkx. In Plotivy you describe the figure and it writes the networkx code for you.

Can I make a non-ribbon chord diagram without writing Python code?

Yes. Describe the non-ribbon chord diagram you need in plain language and upload your dataset — Plotivy's AI writes the Python code and renders a publication-ready figure. You still get the full, editable networkx source, so nothing is locked in a black box.

What are best practices for a clear non-ribbon chord diagram?

Order nodes to minimize crossings. Use edge bundling for many connections.

Long-tail keyword opportunities

how to create non-ribbon chord diagram in python
non-ribbon chord diagram matplotlib
non-ribbon chord diagram seaborn
non-ribbon chord diagram plotly
non-ribbon chord diagram scientific visualization
non-ribbon chord diagram publication figure python

High-intent chart variations

Non-ribbon Chord Diagram with confidence interval overlays
Non-ribbon Chord Diagram optimized for publication layouts
Non-ribbon Chord Diagram with category-specific color encoding
Interactive Non-ribbon Chord Diagram for exploratory analysis

Library comparison for this chart

networkx

Useful in specialized workflows that complement core Python plotting libraries for non-ribbon-chord-diagram analysis tasks.

Free Cheat Sheet

Scientific Chart Selection Cheat Sheet

Not sure whether to use a Violin Plot, Box Plot, or Ridge Plot? Download our single-page reference mapping the most-used scientific chart types, exactly when to use them, and the core Matplotlib/Seaborn functions.

Comparison Charts
Distribution Charts
Time Series Data
Common Mistakes
No spam. Unsubscribe anytime.