Skip to content

Commit 5b5b22f

Browse files
authored
refactor!: improve utils (#605)
1 parent 9033688 commit 5b5b22f

12 files changed

+1938
-1388
lines changed

src/mplhep/__init__.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
from . import exp_lhcb as lhcb
1616
from . import styles as style
1717
from ._tools import Config
18+
from ._utils import (
19+
EnhancedPlottableHistogram,
20+
_check_counting_histogram,
21+
)
22+
from ._utils import (
23+
_get_plottables as get_plottables,
24+
)
25+
from ._utils import (
26+
_make_plottable_histogram as make_plottable_histogram,
27+
)
1828
from ._version import version as __version__ # noqa: F401
1929
from .comparison_functions import (
2030
get_asymmetry,
@@ -32,28 +42,24 @@
3242
)
3343
from .label import add_text, append_text, save_variations, savelabels
3444
from .plot import (
35-
append_axes,
36-
box_aspect,
3745
funcplot,
3846
hist2dplot,
3947
histplot,
48+
)
49+
from .styles import set_style
50+
from .utils import (
51+
append_axes,
52+
box_aspect,
4053
make_square_add_cbar,
4154
merge_legend_handles_labels,
4255
mpl_magic,
4356
rescale_to_axessize,
57+
set_fitting_ylabel_fontsize,
58+
set_ylow,
4459
sort_legend,
45-
ylow,
4660
yscale_anchored_text,
4761
yscale_legend,
4862
)
49-
from .styles import set_style
50-
from .utils import (
51-
EnhancedPlottableHistogram,
52-
_check_counting_histogram,
53-
get_plottables,
54-
make_plottable_histogram,
55-
set_fitting_ylabel_fontsize,
56-
)
5763

5864
# Configs
5965
rcParams = Config(
@@ -118,7 +124,7 @@
118124
"set_style",
119125
"sort_legend",
120126
"style",
121-
"ylow",
127+
"set_ylow",
122128
"yscale_anchored_text",
123129
"yscale_legend",
124130
"add_text",

0 commit comments

Comments
 (0)