8000 Don't clip colorbar dividers · matplotlib/matplotlib@8fa6bd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fa6bd5

Browse files
committed
Don't clip colorbar dividers
They are sometimes right on the edge of the Axes, and the last (or possibly first) don't get drawn due to clipping. Because the divider line width is the same as the Axes frame line width, we don't have to worry about it going outside when unclipped. Fixes #22864
1 parent 5d3124d commit 8fa6bd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ def __init__(self, ax, mappable=None, *, cmap=None,
434434
self.dividers = collections.LineCollection(
435435
[],
436436
colors=[mpl.rcParams['axes.edgecolor']],
437-
linewidths=[0.5 * mpl.rcParams['axes.linewidth']])
437+
linewidths=[0.5 * mpl.rcParams['axes.linewidth']],
438+
clip_on=False)
438439
self.ax.add_collection(self.dividers)
439440

440441
self._locator = None

0 commit comments

Comments
 (0)
0