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()

API for coders

Animation

PlotAPI Chord supports animations - both for looping and for nice introductions to your visualisation.


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

Animations can be controlled with the following parameters:

  • animated_loop will result in an animation that loops forever, this is primarily useful in combination with the to_mp4() end-point to create a looping video.
  • animated_intro will result in an animation that loops once, and serves as a nice introduction to your visualisation as it loads.
  • animated_duration determines how long a single loop will take.

Let’s try both approaches.

Animated intro

Chord(matrix, names, colors="orange_red", wrap_labels=True,
     animated_intro=True, animated_duration=3000).show()
PlotAPI - Chord Diagram

Animated loop

Chord(matrix, names, colors="league", wrap_labels=True,
     animated_loop=True, animated_duration=3000).show()
Previous
Chord