Visualizations Terminus
WebGL or canvas
We may want to switch between the WebGL or D3.js canvas animations depending on our requirements. These have been configured to look the same.
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
To switch between the two, set webgl=True
(the default) for WebGL, and webgl=False
for D3.js canvas animation.
Let's try the D3.js canvas animation.
Terminus(links, webgl=False).show()