Fix and improve defaultplotter ratio
Release notes
Fix ratio plot for the TQDefaultPlotter. Users can now control the gap between the main and ratio plot with geometry.sub.margins.top
and the divisions of the y-axis of the ratio plot with style.ratio.ndivisions
.
Details
Fixes for the ratio plot:
- Settings for title and labels for the x-axis of the ratio plot were not copied to the ratio plot and thus were not shown.
- Manually setting the y-limits for the ratio plot didn't work because the settings were retrieved in a wrong way.
- In the case of empty bins in the total stack (denominator of ratio) the division of the two histograms yields bins which have
-nan
as bin content and error (because of dividing by 0). Somehow this resulted in the whole ratio plot not being drawn. - No arrows are drawn in the ratio if there are no entries in the total stack.
- The subplot type can now be set explicitly to
None
(this is needed if one wants to overwrite this in a config which includes another config where the subplot type is set)
New Features
- Gap between main and sub plot can be controlled with
geometry.sub.margins.top
. Previously this tag was set in the TQDefaultPlotter to0
and now the users have the option to overwrite in the plotting config. (There is already an entry in the tag documentation for this). - The
ndivisions
option for the y-axis of the ratio plot can now be controlled withstyle.ratio.ndivisions
.
Closes #271 (closed)
Edited by Benjamin Rottler