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
Chord(matrix, names,
label_style="radial",
padding=0.5).show()