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 Terminus

Pixel colors

The pixel color scheme can be set to one of many beautiful presets, or even a customized by supplying a list of colors (HEX, RGB, etc.).


Sample data

Let's import PlotAPI and load our sample data.

from plotapi import Terminus

links = [
    {"source":"Germany", "target":"England", "value": 1000},
    {"source":"France",  "target":"England", "value": 3000},
    {"source":"Spain",   "target":"England", "value": 5000},
    {"source":"Italy",   "target":"England", "value": 4000},
    {"source":"Japan",   "target":"England", "value": 800},

    {"source":"Germany", "target":"Ireland", "value": 800},
    {"source":"France",  "target":"Ireland", "value": 4000},
    {"source":"Spain",   "target":"Ireland", "value": 5000},
    {"source":"Italy",   "target":"Ireland", "value": 3000},
    {"source":"Japan",   "target":"Ireland", "value": 1000},
]

Demonstration

To specify pixel colors, we can set the colors parameter to one of the following:

  • A list of color strings, e.g. ["#264653","#2a9d8f","#e9c46a","#f4a261","#e76f51"]. If there are fewer colors than there are categories, PlotAPI Terminus will loop round the colors.
  • The name of a color scheme from one of the many beautuful presets.

The default color scheme is "rainbow". Let's try a few different color schemes.

Terminus(links, colors="turbo").show()
Terminus(links, colors=["#264653","#2a9d8f","#e9c46a","#f4a261","#e76f51"]).show_png()
Notebook PNG image
Terminus(links, colors=["#B8D0EB", "cyan", "rgb(111,45,189)"]).show_png()
Notebook PNG image

Color presets

Take advantage of one of our color presets by passing in its name to the color parameter. Choose from one of the following:

['monsters', 'league', 'movies', 'category10', 'accent', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'rainbow', 'sinebow', 'yellow_red', 'yellow_brown', 'yellow_green', 'yellow_blue', 'red_purple', 'purple_red', 'purple_blue', 'orange_red', 'green_blue', 'blue_purple', 'blue_green', 'cubehelix', 'cool', 'warm', 'cividis', 'plasma', 'magma', 'inferno', 'viridis', 'turbo', 'brown_green', 'purple_green', 'pink_green', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral', 'blues', 'greens', 'greys', 'oranges', 'purples', 'reds']

Previous
Terminus