@@ -230,8 +230,8 @@ def draw(self, renderer):
230
230
231
231
class _ColorbarAxesLocator :
232
232
"""
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.
235
235
"""
236
236
def __init__ (self , cbar ):
237
237
"""
@@ -258,7 +258,7 @@ def __call__(self, ax, renderer):
258
258
pos = ax .get_position (original = True )
259
259
if self ._cbar .extend == 'neither' :
260
260
return pos
261
-
261
+
262
262
y , extendlen = self ._cbar ._proportional_y ()
263
263
if not self ._cbar ._extend_lower ():
264
264
extendlen [0 ] = 0
@@ -273,8 +273,8 @@ def __call__(self, ax, renderer):
273
273
aspect = ax ._colorbar_info ['aspect' ]
274
274
else :
275
275
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.
278
278
if self ._cbar .orientation == 'vertical' :
279
279
if aspect :
280
280
ax .set_aspect (aspect * shrink )
@@ -619,12 +619,6 @@ def _do_extends(self, extendlen):
619
619
# not the total colorbar:
620
620
elower = extendlen [0 ] if self ._extend_lower () else 0
621
621
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
628
622
top = eupper + 1
629
623
630
624
# xyout is the outline of the colorbar including the extend patches:
@@ -638,9 +632,7 @@ def _do_extends(self, extendlen):
638
632
[1 , 1 ], [1 , top ], [0 , top ], [0 , 1 ],
639
633
[0 , - elower ]])
640
634
641
- bounds = np .array ([0.0 , elower , 1.0 , inner_length ])
642
635
if self .orientation == 'horizontal' :
643
- bounds = bounds [[1 , 0 , 3 , 2 ]]
644
636
xyout = xyout [:, ::- 1 ]
645
637
646
638
# xyout is the path for the spine:
0 commit comments