8000 Backport PR #23260: Fix Colorbar extend patches to have correct alpha · matplotlib/matplotlib@cddda1f · GitHub
[go: up one dir, main page]

Skip to content

Commit cddda1f

Browse files
oscargusQuLogic
authored andcommitted
Backport PR #23260: Fix Colorbar extend patches to have correct alpha
1 parent 02219ee commit cddda1f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/colorbar.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,9 @@ def _do_extends(self, ax=None):
703703
val = -1 if self._long_axis().get_inverted() else 0
704704
color = self.cmap(self.norm(self._values[val]))
705705
patch = mpatches.PathPatch(
706-
mpath.Path(xy), facecolor=color, linewidth=0,
707-
antialiased=False, transform=self.ax.transAxes,
706+
mpath.Path(xy), facecolor=color, alpha=self.alpha,
707+
linewidth=0, antialiased=False,
708+
transform=self.ax.transAxes,
708709
hatch=hatches[0], clip_on=False,
709710
# Place it right behind the standard patches, which is
710711
# needed if we updated the extends
@@ -724,7 +725,7 @@ def _do_extends(self, ax=None):
724725
val = 0 if self._long_axis().get_inverted() else -1
725726
color = self.cmap(self.norm(self._values[val]))
726727
patch = mpatches.PathPatch(
727-
mpath.Path(xy), facecolor=color,
728+
mpath.Path(xy), facecolor=color, alpha=self.alpha,
728729
linewidth=0, antialiased=False,
729730
transform=self.ax.transAxes, hatch=hatches[-1], clip_on=False,
730731
# Place it right behind the standard patches, which is

0 commit comments

Comments
 (0)
0