Skip to content

Commit c18771c

Browse files
Add self.alpha to PathPatch creation in _do_extends method
1 parent 60ae76b commit c18771c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/colorbar.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,9 @@ def _do_extends(self, ax=None):
727727
val = -1 if self._long_axis().get_inverted() else 0
728728
color = self.cmap(self.norm(self._values[val]))
729729
patch = mpatches.PathPatch(
730-
mpath.Path(xy), facecolor=color, linewidth=0,
731-
antialiased=False, transform=self.ax.transAxes,
730+
mpath.Path(xy), facecolor=color, alpha=self.alpha,
731+
linewidth=0, antialiased=False,
732+
transform=self.ax.transAxes,
732733
hatch=hatches[0], clip_on=False,
733734
# Place it right behind the standard patches, which is
734735
# needed if we updated the extends
@@ -748,7 +749,7 @@ def _do_extends(self, ax=None):
748749
val = 0 if self._long_axis().get_inverted() else -1
749750
color = self.cmap(self.norm(self._values[val]))
750751
patch = mpatches.PathPatch(
751-
mpath.Path(xy), facecolor=color,
752+
mpath.Path(xy), facecolor=color, alpha=self.alpha,
752753
linewidth=0, antialiased=False,
753754
transform=self.ax.transAxes, hatch=hatches[-1], clip_on=False,
754755
# Place it right behind the standard patches, which is

0 commit comments

Comments
 (0)