poliosim.plotting module

Core plotting functions for simulations, multisims, and scenarios.

Also includes Plotly-based plotting functions to supplement the Matplotlib based ones that are of the Sim and Scenarios objects. Intended mostly for use with the webapp.

get_sim_plots(which='default')[source]

Specify which quantities to plot; used in sim.py.

Parameters

which (str) – either ‘default’ or ‘overview’

get_scen_plots(which='default')[source]

Default scenario plots – used in run.py

plot_sim(sim, to_plot=None, do_save=None, fig_path=None, fig_args=None, plot_args=None, scatter_args=None, axis_args=None, fill_args=None, legend_args=None, show_args=None, as_dates=True, dateformat=None, interval=None, n_cols=None, font_size=18, font_family=None, grid=False, commaticks=True, setylim=True, log_scale=False, colors=None, labels=None, do_show=True, sep_figs=False, fig=None)[source]

Plot the results of a single simulation – see Sim.plot() for documentation

plot_scens(scens, to_plot=None, do_save=None, fig_path=None, fig_args=None, plot_args=None, scatter_args=None, axis_args=None, fill_args=None, legend_args=None, show_args=None, as_dates=True, dateformat=None, interval=None, n_cols=None, font_size=18, font_family=None, grid=False, commaticks=True, setylim=True, log_scale=False, colors=None, labels=None, do_show=True, sep_figs=False, fig=None)[source]

Plot the results of a scenario – see Scenarios.plot() for documentation

plot_result(sim, key, fig_args=None, plot_args=None, axis_args=None, scatter_args=None, font_size=18, font_family=None, grid=False, commaticks=True, setylim=True, as_dates=True, dateformat=None, interval=None, color=None, label=None, fig=None, do_show=True, do_save=False, fig_path=None)[source]

Plot a single result – see Sim.plot_result() for documentation

plot_compare(df, log_scale=True, fig_args=None, plot_args=None, axis_args=None, scatter_args=None, font_size=18, font_family=None, grid=False, commaticks=True, setylim=True, as_dates=True, dateformat=None, interval=None, color=None, label=None, fig=None)[source]

Plot a MultiSim comparison – see MultiSim.plot_compare() for documentation

plot_people(people, bins=None, width=1.0, font_size=18, alpha=0.6, fig_args=None, axis_args=None, plot_args=None)[source]

Plot statistics of a population – see People.plot() for documentation