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

Skip to content

Commit 983dfe6

Browse files
committed
Import matplotlib as mpl in dates.
This is consistent with other files.
1 parent 34f99a9 commit 983dfe6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/matplotlib/dates.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
import dateutil.tz
163163
import numpy as np
164164

165-
import matplotlib
165+
import matplotlib as mpl
166166
import matplotlib.units as units
167167
import matplotlib.cbook as cbook
168168
import matplotlib.ticker as ticker
@@ -187,7 +187,7 @@
187187

188188
def _get_rc_timezone():
189189
"""Retrieve the preferred timezone from the rcParams dictionary."""
190-
s = matplotlib.rcParams['timezone']
190+
s = mpl.rcParams['timezone']
191191
if s == 'UTC':
192192
return UTC
193193
return dateutil.tz.gettz(s)
@@ -281,7 +281,7 @@ def get_epoch():
281281
global _epoch
282282

283283
if _epoch is None:
284-
_epoch = matplotlib.rcParams['date.epoch']
284+
_epoch = mpl.rcParams['date.epoch']
285285
return _epoch
286286

287287

@@ -913,7 +913,7 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d'):
913913
self._tz = tz
914914
self.defaultfmt = defaultfmt
915915
self._formatter = DateFormatter(self.defaultfmt, tz)
916-
rcParams = matplotlib.rcParams
916+
rcParams = mpl.rcParams
917917
self.scaled = {
918918
DAYS_PER_YEAR: rcParams['date.autoformatter.year'],
919919
DAYS_PER_MONTH: rcParams['date.autoformatter.month'],

0 commit comments

Comments
 (0)