Visualizations Terminus
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
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()
Terminus(links, pipe_color="cyan", pipe_opacity=0.1).show_png()