Visualizations Chord
Arc numbers
PlotAPI Chord supports displaying the quantity associated with each arc as a label.
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 visibility of quantity labels can be controlled with the arc_numbers
parameter. Setting it to True
will enable them.
Chord(matrix, names, colors="monsters",
arc_numbers=True).show()