Engaging plots, made easy.

Easily turn your data into engaging visualizations. Powerful API for coders. Powerful app for everyone.

from plotapi import Chord

Chord(matrix, names).show()

API for coders

Directed chords

The default behaviour of PlotAPI chord is to represent both sides of a relationship with a single chord. However, it may be more suitable to use two different chords with arrows to indicate the dimension of a relationship.

Sample data

Let’s import PlotAPI and load our sample data.

from plotapi import Chord

matrix = [
    [0, 5, 6, 4],
    [2, 0, 5, 4],
    [6, 5, 0, 4],
    [2, 4, 3, 0],

names = ["Action", "Adventure", "Comedy", "Drama"]


To enable directed mode, we only need to set the directed parameter to true.

Chord(matrix, names, directed=True, colors="spectral").show()
PlotAPI - Chord Diagram

The directed Chord diagram can be paired with reverse_gradients=True to make it easier to see where inbound/outbound relationships are coming from or going to.

Chord(matrix, names, directed=True, colors="spectral", reverse_gradients=True).show()