Skip to content

Commit be11ed5

Browse files
fix: make fontsize same for experiment label and secondary label for ATLAS (#531)
* Make fontsize same for experiment label and secondary label for ATLAS * adjusted further to match the heights * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated reference image for pytest --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent dfae7e3 commit be11ed5

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ coverage.xml
4949
*.cover
5050
.hypothesis/
5151
.pytest_cache/
52+
flow_th1.root
53+
result_images/
5254

5355
# Translations
5456
*.mo

src/mplhep/label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def dist(tup):
183183
transform=_t,
184184
ha="left",
185185
va=loc2_dict[loc]["va"],
186-
fontsize=_font_size,
186+
fontsize=_font_size * 1.2 if exp == "ATLAS" else _font_size,
187187
fontname=fontname,
188188
fontstyle="italic" if italic[1] else "normal",
189189
)
@@ -329,7 +329,7 @@ def exp_label(
329329
fontname : string, optional
330330
Name of font to be used.
331331
fontsize : string, optional
332-
Defines size of "secondary label". Experiment label is 1.3x larger.
332+
Defines size of the experiment label and the secondary label.
333333
exp_weight : string, optional
334334
Set fontweight of <exp> label. Default "bold".
335335
italic : (bool, bool, bool), optional

tests/baseline/test_style_atlas.png

908 Bytes
Loading

0 commit comments

Comments
 (0)