plot_all#

Example plot function.

Functions:

draw_error_bands(ax, h[, norm])

rtype:

None

draw_stack(ax, h[, norm])

rtype:

None

draw_hist(ax, h[, norm])

rtype:

None

draw_profile(ax, h[, norm])

Profiled histograms contains the storage type "Mean" and can therefore not be normalized

draw_errorbars(ax, h[, norm])

rtype:

None

plot_all(plot_config, style_config[, ...])

Function that calls multiple plotting methods based on two configuration dictionaries, plot_config and style_config.

draw_error_bands(ax, h, norm=1.0, **kwargs)[source]#
Return type:

None

draw_stack(ax, h, norm=1.0, **kwargs)[source]#
Return type:

None

draw_hist(ax, h, norm=1.0, **kwargs)[source]#
Return type:

None

draw_profile(ax, h, norm=1.0, **kwargs)[source]#

Profiled histograms contains the storage type “Mean” and can therefore not be normalized

Return type:

None

draw_errorbars(ax, h, norm=1.0, **kwargs)[source]#
Return type:

None

plot_all(plot_config, style_config, skip_ratio=False, skip_legend=False, cms_label='wip', whitespace_fraction=0.3, magnitudes=4, **kwargs)[source]#

Function that calls multiple plotting methods based on two configuration dictionaries, plot_config and style_config.

The plot_config expects dictionaries with fields: “method”: str, identical to the name of a function defined above, “hist”: hist.Hist or hist.Stack, “kwargs”: dict (optional), “ratio_kwargs”: dict (optional),

The style_config expects fields (all optional): “gridspec_cfg”: dict, “ax_cfg”: dict, “rax_cfg”: dict, “legend_cfg”: dict, “cms_label_cfg”: dict,

Parameters:
  • plot_config – Dictionary that defines which plot methods will be called with which key word arguments.

  • style_config – Dictionary that defines arguments on how to style the overall plot.

  • skip_ratio (default: False) – Optional bool parameter to not display the ratio plot.

  • skip_legend (default: False) – Optional bool parameter to not display the legend.

  • cms_label (default: 'wip') – Optional string parameter to set the CMS label text.

  • whitespace_fraction (default: 0.3) – Optional float parameter that defines the ratio of which the plot will consist of whitespace for the legend and labels

  • magnitudes (default: 4) – Optional float parameter that defines the displayed ymin when plotting with a logarithmic scale.

Returns:

tuple of plot figure and axes