Visualizations Terminus
Pixel size
The Terminus pixel size can be modified to improve the presentation of our diagram, this works as intended in both WebGL and D3.js canvas mode.
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 change the pixel size, we simply change the value of pixel_size
.
Let's try a pixel size smaller than the default setting.
Terminus(links, pixel_size=2).show()