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

Bar styling

The bars that appear at each terminus can be modified or hidden entirely. This gives us even more control over 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

There are many opportunities to customise the Terminus bars.

  • show_bars, to hide or show the bars.
  • outer_bars, to place the bars inside or outside a terminus.
  • bar_width, to set the maximum width of the bars.
  • colored_target_bars, to enable or disable colored target bars. By default, they are all black.

Let’s try a few combinations.

Terminus(
    links, height=400, 
    outer_bars=True, bar_width=150, colored_target_bars=True
).show()
Terminus(links, height=400, show_bars=False).show_png()
Notebook PNG image
Previous
Terminus