Cheat Sheet

Pointers on where to start to achieve some functionality.

How do I…

Documentation

Example

transform a wide dataset into a tidy one

pandas.melt

df.melt(index_col=["time" ])

add labels that follow the data

inline labels

ah.Array(..., inline_labe ls="y")

stack a pair of plots

`overlay <../essentials/mer ging.ipynb#overlay-objects> `__

ah.Array(...) * ah.Array( ...)

create subplots side by side

layout _

ah.Array(...) + ah.Array( ...)

map data geographically

mapping

ah.Array(..., crs="platec aree", projection="robinson ")

pause animation to add a commentary

remarking

ah.Array(...).remark("is 2", ys=2)

set a default value

defaults

ah.config_defaults("plot" , color="black")

make a bar chart race

race

ah.Array(..., preset="rac e")

delay replay of animation

durations

ah.Array(...).config("dur ations", final_frame=5)

render in parallel

workers

``ah.Array(…, workers=8)` `

reduce choppiness of animation

fps

ah.Array(..., fps=30)

use keyword not directly exposed in ahlive

keywords

ah.Array(..., c=[1, 2, 3] )

postprocess frame with custom code

hooks

ah.Array(..., hooks=[post process_fig])