Engaging plots, made easy.

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

main.py
notebook.ipynb
main.rs
from plotapi import Chord

Chord(matrix, names).show()

Visualizations Chord

Arc padding

Adjusting padding may not sound exciting, but in this case, it can have some interesting effects.


Sample data

Let's import PlotAPI and load our sample data.

from plotapi import Chord

matrix = [
    [0, 5, 6, 4, 7, 4],
    [5, 0, 5, 4, 6, 5],
    [6, 5, 0, 4, 5, 5],
    [4, 4, 4, 0, 5, 5],
    [7, 6, 5, 5, 0, 4],
    [4, 5, 5, 5, 4, 0],
]

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

Demonstration

The padding parameter adjusts the padding between the Chord diagram segments. This value must be a float between or equal to 0.0 and 1.0. Values below 0.5 look better.

Chord(matrix, names, 
      label_style="radial",
      padding=0.5).show()
Previous
Chord