atomica.plotting.plot_bars

atomica.plotting.plot_bars(plotdata, stack_pops=None, stack_outputs=None, outer=None, legend_mode=None, show_all_labels=False, orientation='vertical')[source]

Produce a bar plot

Parameters
  • plotdata – a PlotData instance to plot

  • stack_pops – A list of lists with populations to stack. A bar is rendered for each item in the list. For example, [[‘0-4’,’5-14’],[‘15-64’]] will render two bars, with two populations stacked in the first bar, and only one population in the second bar. Items not appearing in this list will be rendered unstacked.

  • stack_outputs – Same as stack_pops, but for outputs.

  • outer – Optionally select whether the outermost/highest level of grouping is by ‘times’ or by ‘results’

  • legend_mode – override the default legend mode in settings

  • show_all_labels – If True, then inner/outer labels will be shown even if there is only one label

  • orientation – ‘vertical’ (default) or ‘horizontal’

Return type

list

Returns

A list of newly created Figures