Visualizations Chord
Chord opacity
The opacity of the inner section of the Chord diagram, or the _chords_, can be changed. The opacity will change on `mouseover` to highlight the selected connections.
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 opacity
, opacity_highlighted
, and opacity_unhighlighted
, parameters control the chord opacity during different states.
These values must be a float between or equal to
Chord(matrix, names,
opacity=0.2,
opacity_highlighted=1,
opacity_unhighlighted=0).show()
Interact with the chords to see the different opacities in action.