Plots¶
Needs matplotlib (pip install "tenqsp[plot]"). Each function draws on ax= (or a new
figure) and returns the matplotlib Axes.
Plots (needs the optional matplotlib: pip install tenqsp[plot]).
Each function draws on ax (a new figure if not given) and returns the matplotlib
Axes; it sets labels from the model's names and units, and nothing else (no style).
trajectories: an output over time, one line per scenario (a result or a batch).fan: the median and a band of a batch's scenarios over time, per group.sensitivity: a heat map of a sensitivity table, parameter x time.snapshot: a field along one of its axes at chosen times.
trajectories(result, output, *, ax=None, log=False, label=None)
¶
output over time: one line for a SimResult, one per
scenario for a BatchResult (labelled by scenario name when
there are at most 10). log: a log y axis.
fan(batch, output, *, by=None, q=(5, 50, 95), ax=None, log=False)
¶
The middle quantile of q as a line and the outer two as a band, over the batch's
scenarios at each time; one per group of by (a varied column, e.g. "regimen"),
else one for the whole batch.
sensitivity(s, output, *, ax=None, cmap='RdBu_r')
¶
A heat map of s[output] (a Sensitivity): one row per
name in wrt, one column per output time; colours centred on 0.
snapshot(result, field, *, axis, times, ax=None, log=False)
¶
A field along axis at the output times nearest to times (one line each),
summed over its other axes. result: a SimResult or Solution whose field is in it.