Skip to content

Commit 543564e

Browse files
0ctagonandrzejnovak
authored andcommitted
feat: changed to HEP specific label
1 parent d08fe3c commit 543564e

11 files changed

+6
-6
lines changed

examples/model_ex/model_all_comparisons.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
comparison=comp,
116116
xlabel="",
117117
h1_label="Data",
118-
h2_label="Pred.",
118+
h2_label="MC",
119119
h1_w2method="poisson",
120120
)
121121
add_text(

examples/model_ex/model_all_comparisons_no_model_unc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@
126126
comparison=comp,
127127
xlabel="",
128128
h1_label="Data",
129-
h2_label="Pred.",
129+
h2_label="MC",
130130
h1_w2method="poisson",
131131
)
132132
if comp == "pull":
133-
# Since the uncertainties of the model are neglected, the pull label is "(Data - Pred.)/sigma_Data"
134-
ax_comparison.set_ylabel(r"$\frac{Data-Pred.}{\sigma_{Data}}$")
133+
# Since the uncertainties of the model are neglected, the pull label is "(Data - MC)/sigma_Data"
134+
ax_comparison.set_ylabel(r"$\frac{Data-MC}{\sigma_{Data}}$")
135135
mh.add_text(
136136
rf' $\mathbf{{→}}$ comparison = "{comp}"',
137137
ax=ax_comparison,

src/mplhep/comparison_plotters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def data_model(
433433
plot_only : str, optional
434434
If "ax_main" or "ax_comparison", only the main or comparison axis is plotted on the figure. Both axes are plotted if None is specified, which is the default. This can only be used when fig, ax_main and ax_comparison are not provided by the user.
435435
**comparison_kwargs : optional
436-
Arguments to be passed to comparison(), including the choice of the comparison function and the treatment of the uncertainties (see documentation of comparison() for details). If they are not provided explicitly, the following arguments are passed by default: h1_label="Data", h2_label="Pred.", comparison="split_ratio".
436+
Arguments to be passed to comparison(), including the choice of the comparison function and the treatment of the uncertainties (see documentation of comparison() for details). If they are not provided explicitly, the following arguments are passed by default: h1_label="Data", h2_label="MC", comparison="split_ratio".
437437
438438
Returns
439439
-------
@@ -478,7 +478,7 @@ def data_model(
478478
model_sum_kwargs = model_sum_kwargs.copy()
479479

480480
comparison_kwargs.setdefault("h1_label", data_label)
481-
comparison_kwargs.setdefault("h2_label", "Pred.")
481+
comparison_kwargs.setdefault("h2_label", "MC")
482482
comparison_kwargs.setdefault("comparison", "split_ratio")
483483

484484
model_components = stacked_components + unstacked_components
-337 Bytes
Loading
-450 Bytes
Loading
-146 Bytes
Loading
-9 Bytes
Loading
-222 Bytes
Loading
-8 Bytes
Loading
-31 Bytes
Loading

0 commit comments

Comments
 (0)