Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8704345

Browse files
committed
FIX: ensure that used sub-packages are actually imported
closes #22305
1 parent fd51e05 commit 8704345

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/ticker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
import matplotlib as mpl
135135
from matplotlib import _api, cbook
136136
from matplotlib import transforms as mtransforms
137+
import matplotlib.font_manager as mfont_manager
137138

138139
_log = logging.getLogger(__name__)
139140

@@ -441,8 +442,8 @@ def __init__(self, useOffset=None, useMathText=None, useLocale=None):
441442
useMathText = mpl.rcParams['axes.formatter.use_mathtext']
442443
if useMathText is False:
443444
try:
444-
ufont = mpl.font_manager.findfont(
445-
mpl.font_manager.FontProperties(
445+
ufont = mfont_manager.findfont(
446+
mfont_manager.FontProperties(
446447
mpl.rcParams["font.family"]
447448
),
448449
fallback_to_default=False,

0 commit comments

Comments
 (0)