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

Skip to content

Commit 11d1999

Browse files
committed
FIX: flake8
1 parent ac33b8a commit 11d1999

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121
)
2222

2323

24-
def _make_inset_locator(rect, trans, parent):
24+
def _make_secondary_locator(rect, trans, parent):
2525
"""
26-
Helper function to locate inset axes, used in
27-
`.Axes.inset_axes_from_bounds`.
26+
Helper function to locate the secondary axes.
2827
2928
A locator gets used in `Axes.set_aspect` to override the default
3029
locations... It is a function that takes an axes object and
3130
a renderer and tells `set_aspect` where it is to be placed.
3231
32+
This locator make the transform be in axes-relative co-coordinates
33+
because that is how we specify the "location" of the secondary axes.
34+
3335
Here *rect* is a rectangle [l, b, w, h] that specifies the
3436
location for the axes in the transform given by *trans* on the
3537
*parent*.
@@ -170,11 +172,13 @@ def set_location(self, location):
170172
bounds = [self._pos, 0, 1e-10, 1]
171173

172174
transform = self._parent.transAxes
173-
secondary_locator = _make_inset_locator(bounds,
175+
secondary_locator = _make_secondary_locator(bounds,
174176
transform, self._parent)
175177
bb = secondary_locator(None, None)
176178

177-
# this locator lets the axes move if in data coordinates.
179+
# this locator lets the axes move in the parent axes coordinates.
180+
# so it never needs to know where the parent is explicitly in
181+
# figure co-ordinates.
178182
# it gets called in `ax.apply_aspect() (of all places)
179183
self.set_axes_locator(secondary_locator)
180184

lib/matplotlib/axis.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,10 +1469,8 @@ def update_units(self, data):
14691469
return False
14701470

14711471
neednew = self.converter != converter
1472-
print('neednew', neednew, self.units)
14731472
self.converter = converter
14741473
default = self.converter.default_units(data, self)
1475-
print('default', default, data)
14761474
if default is not None and self.units is None:
14771475
self.set_units(default)
14781476

@@ -1760,7 +1758,6 @@ def axis_date(self, tz=None):
17601758
if isinstance(tz, str):
17611759
import dateutil.tz
17621760
tz = dateutil.tz.gettz(tz)
1763-
print('tzdate', tz)
17641761
self.update_units(datetime.datetime(2009, 1, 1, 0, 0, 0, 0, tz))
17651762

17661763
def get_tick_space(self):

lib/matplotlib/dates.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ def _from_ordinalf(x, tz=None):
311311

312312
# add hours, minutes, seconds, microseconds
313313
dt += datetime.timedelta(microseconds=remainder_musec)
314-
print('tz', tz)
315314
return dt.astimezone(tz)
316315

317316

0 commit comments

Comments
 (0)