Skip to content

Commit

Permalink
fix: make fontsize same for experiment label and secondary label for …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
diptaparna and pre-commit-ci[bot] authored Oct 24, 2024
1 parent dfae7e3 commit be11ed5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
flow_th1.root
result_images/

# Translations
*.mo
Expand Down
4 changes: 2 additions & 2 deletions src/mplhep/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def dist(tup):
transform=_t,
ha="left",
va=loc2_dict[loc]["va"],
fontsize=_font_size,
fontsize=_font_size * 1.2 if exp == "ATLAS" else _font_size,
fontname=fontname,
fontstyle="italic" if italic[1] else "normal",
)
Expand Down Expand Up @@ -329,7 +329,7 @@ def exp_label(
fontname : string, optional
Name of font to be used.
fontsize : string, optional
Defines size of "secondary label". Experiment label is 1.3x larger.
Defines size of the experiment label and the secondary label.
exp_weight : string, optional
Set fontweight of <exp> label. Default "bold".
italic : (bool, bool, bool), optional
Expand Down
Binary file modified tests/baseline/test_style_atlas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit be11ed5

Please sign in to comment.