Interpolating

ahlive can make animations alive.

interp

There are various interp methods built-in.

[1]:
import ahlive as ah
ah.overlay([
    ah.Array(
        [0, 20], [i] * 2, s=[50, 1000],
        interp=interp, inline_labels=interp,
        fps=30, ymargins=0.05, revert='traceback'
    ) for i, interp in enumerate(ah.easing.INTERPS)
]).render()
/home/docs/checkouts/readthedocs.org/user_builds/ahlive/conda/main/lib/python3.9/site-packages/ahlive-0.0.3.post178+dirty-py3.9.egg/ahlive/data.py:578: UserWarning: More than 10 items in legend; setting legend=False; set legend=True to show legend.
[########################################] | 100% Completed | 19.0s
[1]:

ease

There are also three easing methods for each of these interp methods.

[2]:
import ahlive as ah

overlays = []
for interp in ah.easing.INTERPS:
    overlays.append(
        ah.overlay([
            ah.Array(
                [0, 20], [i] * 2,
                s=[50, 1000],
                interp=interp, title=interp,
                ease=ease, inline_labels=ease,
                figsize=(10, 10), ymargins=0.1,
                frames=15, fps=30, revert='traceback'
            ) for i, ease in enumerate(ah.easing.EASES)
        ])
    )
layout = ah.layout(overlays, num_cols=4)
layout.config(
    spacing={
        'left': 0.05,
        'right': 0.95,
        'bottom': 0.05,
        'top': 0.95
    },
).render()
[########################################] | 100% Completed | 35.0s
[2]: