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

Visualizations Heat Map

Popup layout and format

The popup supports many customizations, including the text format, width, and disabling it entirely.


Sample data

Let's import PlotAPI and load our sample data.

from plotapi import HeatMap

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],
]

row_names = ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]
col_names = ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]

Demonstration

Popup width

We can modify the popup width with the popup_width parameter.

HeatMap(matrix, row_names=row_names, col_names=col_names, popup_width=100).show()

Disabling the popup

We can disable the popup with the popup_enabled parameter.

HeatMap(matrix, row_names=row_names, col_names=col_names, popup_enabled=False).show()
PlotAPI - Heat Map Diagram

Popup text format

We can change the noun, verb, and conjunction used in the popup text such that it is relevant for our visualisation. We can also remove them entirely and display names only.

The default looks like this (similar to Chord):

Modified popup text

An example modification looks like this:

Modified popup text

We can modify the popup text template with the conjunction, verb, and noun parameters.

HeatMap(matrix, row_names=row_names, col_names=col_names,
        conjunction="&", verb="appear together in", noun="cases").show()
PlotAPI - Heat Map Diagram

Showing names only

We can show only the names in the popup with the popup_names_only parameter.

HeatMap(matrix, row_names=row_names, col_names=col_names,
        popup_names_only=True).show()
PlotAPI - Heat Map Diagram
Previous
Heat Map