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

API for coders

Pipe colors

The pipe color and opacity can be changed to improve the presentation of our Terminus diagram.


Sample data

Let’s import PlotAPI and load our sample data.

from plotapi import Terminus

links = [
    {"source":"England", "target":"Germany", "value": 1000},
    {"source":"England", "target":"France", "value": 3000},
    {"source":"England", "target":"Spain", "value": 5000},
    {"source":"England", "target":"Italy", "value": 4000},
    {"source":"England", "target":"Japan", "value": 800},
    
    {"source":"Ireland", "target":"Germany", "value": 3500},
    {"source":"Ireland", "target":"France", "value": 3750},
    {"source":"Ireland", "target":"Spain", "value": 1750},
    {"source":"Ireland", "target":"Italy", "value": 5000},
    {"source":"Ireland", "target":"Japan", "value": 400},
]

Demonstration

The pipe_opacity must be a float between or equal to 0.0 and 1.0.

The pipe_color must be a colour expressed as a string, e.g. a HEX color code.

Let’s try a few combinations.

Terminus(links,
         pipe_color="#FFFF00", pipe_opacity=0.1).show()
Terminus(links, pipe_color="#000000", pipe_opacity=1).show_png()
Notebook PNG image
Terminus(links, pipe_color="cyan", pipe_opacity=0.1).show_png()
Notebook PNG image
Previous
Terminus