Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit298a23f

Browse files
committed
Don't clip colorbar dividers
They are sometimes right on the edge of the Axes, and the last (orpossibly first) don't get drawn due to clipping. Because the dividerline width is the same as the Axes frame line width, we don't have toworry about it going outside when unclipped.Fixes#22864
1 parent5d0d141 commit298a23f

File tree

5 files changed

+380
-23
lines changed

5 files changed

+380
-23
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
Binary file not shown.
Lines changed: 351 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp