afw.common.plot_thing#
- afw.common.plot_thing(histogram: Hist, metadata: dict[str, dict], title: str, xlabel: str, units: str) None[source]#
A convenience function used to generate a bar graph and Data/MC agreement plot, as well as plot signal
- Parameters:
histogram (
hist.Hist) – The histogram object to plot. This should have two axis: a dataset axis and an axis to plotmetadata (
dict[str,dict]) – Metadata for plottingtitle (
str) – The title of the appropriate histogramxlabel (
str) – The x label of the appropriate histogramunits (
str) – The units of bin width, for use when labeling axis
- Returns:
A figure which may be saved locally
- Return type:
plt.Figure