Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ff255a

Browse files
committed
TST: update constrained_layout images
1 parent 8e070e8 commit 2ff255a

14 files changed

+4
-7
lines changed

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def __call__(self):
248248
ticks = super().__call__()
249249
return self._trim_ticks(np.asarray(ticks))
250250

251-
252251
def tick_values(self, vmin, vmax):
253252
if vmin is not None and vmax is not None and vmin > vmax:
254253
vmax, vmin = vmin, vmax
@@ -537,7 +536,8 @@ def _get_ticker_locator_formatter(self):
537536
minorlocator = self.minorlocator
538537
minorformatter = self.minorformatter
539538

540-
if self.boundaries is None:
539+
if (self.boundaries is None and
540+
not isinstance(self.norm, colors.BoundaryNorm)):
541541
if locator is None:
542542
locator = _LocatorWrapper(
543543
self._long_axis().get_major_locator(), colorbar=self)

lib/matplotlib/scale.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def forward(values: array-like) -> array-like
178178
self._transform = transform
179179
self._kwargs = {'functions': functions}
180180

181-
182181
def get_transform(self):
183182
"""Return the `.FuncTransform` associated with this scale."""
184183
return self._transform
@@ -578,8 +577,7 @@ def __init__(self, axis, nonpositive='mask', *,
578577
self._use_overline = use_overline
579578
self._one_half = one_half
580579
self._kwargs = {'nonpositive': nonpositive, 'one_half': one_half,
581-
'use_overline':use_overline}
582-
580+
'use_overline': use_overline}
583581

584582
def get_transform(self):
585583
"""Return the `.LogitTransform` associated with this scale."""

lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def test_image_preserve_size2():
786786
np.identity(n, bool)[::-1])
787787

788788

789-
@image_comparison(['mask_image_over_under.png'], remove_text=False, tol=1.0)
789+
@image_comparison(['mask_image_over_under.png'], remove_text=True, tol=1.0)
790790
def test_mask_image_over_under():
791791
# Remove this line when this test image is regenerated.
792792
plt.rcParams['pcolormesh.snap'] = False

lib/mpl_toolkits/tests/test_axes_grid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ def test_imagegrid():
6363
ax = grid[0]
6464
im = ax.imshow([[1, 2]], norm=mpl.colors.LogNorm())
6565
cb = ax.cax.colorbar(im)
66-
assert isinstance(cb.locator, mpl.colorbar._ColorbarLogLocator)

0 commit comments

Comments
 (0)