By default, Chord displays occurrences where a category is not related to another category. These values appear in the diagonal of the matrix. It may be desirable to hide (but not remove) these values.
Let's import PlotAPI and load our sample data.
from plotapi import Chord names = ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]
Below is an example of a matrix with occurrences listed in the diagonal. They have all been set to a value of
The representation of the diagonal values can be hidden by setting colored_diagonals=False.
Let's first see what they look like when they're visible.
Chord(matrix, names, title="Diagonals colored").show()
Now let's see what it looks like when they're not visible.
Chord(matrix, names, title="Diagonals not colored", colored_diagonals=False).show()