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

Skip to content

Commit eab1f92

Browse files
committed
FIX: minot cleanups
1 parent 735de0d commit eab1f92

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

lib/matplotlib/colorbar.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ def draw(self, renderer):
230230

231231
class _ColorbarAxesLocator:
232232
"""
233-
Wrap any locator on the axes, or its position, to shrink the
234-
inner axes if there are extend triangles at either min or max.
233+
Wrap any locator on the axes, or its position, to shrink the
234+
inner axes if there are extend triangles at either min or max.
235235
"""
236236
def __init__(self, cbar):
237237
"""
@@ -258,7 +258,7 @@ def __call__(self, ax, renderer):
258258
pos = ax.get_position(original=True)
259259
if self._cbar.extend == 'neither':
260260
return pos
261-
261+
262262
y, extendlen = self._cbar._proportional_y()
263263
if not self._cbar._extend_lower():
264264
extendlen[0] = 0
@@ -273,8 +273,8 @@ def __call__(self, ax, renderer):
273273
aspect = ax._colorbar_info['aspect']
274274
else:
275275
aspect = False
276-
# now shrink and/or offset to take into account the
277-
# extend tri/rectangles.
276+
# now shrink and/or offset to take into account the
277+
# extend tri/rectangles.
278278
if self._cbar.orientation == 'vertical':
279279
if aspect:
280280
ax.set_aspect(aspect*shrink)
@@ -619,12 +619,6 @@ def _do_extends(self, extendlen):
619619
# not the total colorbar:
620620
elower = extendlen[0] if self._extend_lower() else 0
621621
eupper = extendlen[1] if self._extend_upper() else 0
622-
total_len = eupper + elower + 1
623-
elower = elower
624-
eupper = eupper
625-
inner_length = 1 / total_len
626-
627-
# make the inner axes smaller to make room for the extend rectangle
628622
top = eupper + 1
629623

630624
# xyout is the outline of the colorbar including the extend patches:
@@ -638,9 +632,7 @@ def _do_extends(self, extendlen):
638632
[1, 1], [1, top], [0, top], [0, 1],
639633
[0, -elower]])
640634

641-
bounds = np.array([0.0, elower, 1.0, inner_length])
642635
if self.orientation == 'horizontal':
643-
bounds = bounds[[1, 0, 3, 2]]
644636
xyout = xyout[:, ::-1]
645637

646638
# xyout is the path for the spine:

0 commit comments

Comments
 (0)