I have added several options to plotGof.py to make plotting goodness-of-fit test statistics a bit more flexible. Previously when we plot with a JSON file containing all test statistic values, the script will plot a histogram with its range based on the highest and lowest value of the test statistic in that JSON file. This may cause problems when the JSON file contains an outlier.
For example, here is a goodness-of-fit plot with default options:
As you may not notice, there is a very small outlier bump around 4400, and this causes the whole distribution to be skewed sharply to the left.
I have added options --range and --bins allowing users to change histogram range and bins to better display the distribution of test statistics, regardless of outliers.
Here is the same distribution plotted with --range and --bins options applied:
The changes I am proposing would require changing the plotting functions in CombineTools/python/plotting.py, but it should not break existing code. Please let me know if you would like me to make any further changes.
Hi,
I have added several options to plotGof.py to make plotting goodness-of-fit test statistics a bit more flexible. Previously when we plot with a JSON file containing all test statistic values, the script will plot a histogram with its range based on the highest and lowest value of the test statistic in that JSON file. This may cause problems when the JSON file contains an outlier.
For example, here is a goodness-of-fit plot with default options:![gof_plot_default](https://user-images.githubusercontent.com/24592763/159122251-dbba86e5-d0bb-448b-90ca-a51836f8a6bc.png)
As you may not notice, there is a very small outlier bump around 4400, and this causes the whole distribution to be skewed sharply to the left.
I have added options
--range
and--bins
allowing users to change histogram range and bins to better display the distribution of test statistics, regardless of outliers.Here is the same distribution plotted with
![gof_plot_rangeandbin](https://user-images.githubusercontent.com/24592763/159122404-ea92fe33-0fb8-4343-bd6b-014c5247e522.png)
--range
and--bins
options applied:The changes I am proposing would require changing the plotting functions in
CombineTools/python/plotting.py
, but it should not break existing code. Please let me know if you would like me to make any further changes.Thanks, Vichayanun