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

Skip to content

Commit e0972f0

Browse files
committed
pep8 + minor variable re-naming
1 parent 4cc466e commit e0972f0

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/matplotlib/quiver.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ def __init__(self, Q, X, Y, U, label, **kw):
240240
weak_self = weakref.ref(self)
241241

242242
def on_dpi_change(fig):
243-
_s = weak_self()
244-
if _s is not None:
245-
_s.labelsep = (_s._labelsep_inches * fig.dpi)
246-
_s._initialized = False # simple brute force update
243+
self_weakref = weak_self()
244+
if self_weakref is not None:
245+
self_weakref.labelsep = (self_weakref._labelsep_inches*fig.dpi)
246+
self_weakref._initialized = False # simple brute force update
247247
# works because _init is called
248248
# at the start of draw.
249249

@@ -448,11 +448,11 @@ def __init__(self, ax, *args, **kw):
448448
weak_self = weakref.ref(self)
449449

450450
def on_dpi_change(fig):
451-
_s = weak_self()
452-
if _s is not None:
453-
_s._new_UV = True # vertices depend on width, span
451+
self_weakref = weak_self()
452+
if self_weakref is not None:
453+
self_weakref._new_UV = True # vertices depend on width, span
454454
# which in turn depend on dpi
455-
_s._initialized = False # simple brute force update
455+
self_weakref._initialized = False # simple brute force update
456456
# works because _init is called
457457
# at the start of draw.
458458

@@ -888,8 +888,9 @@ def __init__(self, ax, *args, **kw):
888888

889889
#Make a collection
890890
barb_size = self._length ** 2 / 4 # Empirically determined
891-
mcollections.PolyCollection.__init__(self, [], (barb_size,), offsets=xy,
892-
transOffset=transform, **kw)
891+
mcollections.PolyCollection.__init__(self, [], (barb_size,),
892+
offsets=xy,
893+
transOffset=transform, **kw)
893894
self.set_transform(transforms.IdentityTransform())
894895

895896
self.set_UVC(u, v, c)

0 commit comments

Comments
 (0)