defaults

defaults

Set the defaults across each of the different files.

The precision (32 bit by default, or 64 bit) is shared with Starsim; to change it, use::

cv.options.set(precision=64)

Functions

Name Description
get_default_colors Specify the plot colors of the results, by result name without its prefix
get_default_plots Specify which quantities to plot.

get_default_colors

defaults.get_default_colors()

Specify the plot colors of the results, by result name without its prefix (e.g. “infections” for “cum_infections”). The plotting functions use cv.defaults.default_colors, which is built once from this.

NB, includes duplicates since stocks and flows are named differently.

get_default_plots

defaults.get_default_plots(which='default', kind='sim', sim=None)

Specify which quantities to plot.

Parameters

Name Type Description Default
which str ‘default’, ‘overview’, ‘variant’, ‘overview-variant’, ‘seir’, or ‘all’ 'default'
kind str ‘sim’ for a single sim, or ‘scens’ for scenarios and multisims (which have different default plots) 'sim'
sim Sim the sim; only needed for which=‘all’, which plots every result key of the sim None

Returns

Name Type Description
A dict of lists of result keys (keyed by plot title), or a list of result keys (one plot each)