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

Skip to content

Commit 554b784

Browse files
committed
Scatter ravel is performed before _process_unit_info() is called.
1 parent 4aa7efe commit 554b784

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4657,14 +4657,14 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
46574657
# further processed by the rest of the function
46584658
linewidths = kwargs.pop('linewidth', None)
46594659
edgecolors = kwargs.pop('edgecolor', None)
4660-
# Process **kwargs to handle aliases, conflicts with explicit kwargs:
4661-
x, y = self._process_unit_info([("x", x), ("y", y)], kwargs)
46624660
# np.ma.ravel yields an ndarray, not a masked array,
46634661
# unless its argument is a masked array.
46644662
x = np.ma.ravel(x)
46654663
y = np.ma.ravel(y)
46664664
if x.size != y.size:
46674665
raise ValueError("x and y must be the same size")
4666+
# Process **kwargs to handle aliases, conflicts with explicit kwargs:
4667+
x, y = self._process_unit_info([("x", x), ("y", y)], kwargs)
46684668

46694669
if s is None:
46704670
s = (20 if mpl.rcParams['_internal.classic_mode'] else

lib/matplotlib/tests/test_category.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ def test_update_plot(self, plotter):
253253

254254
fids, fvalues = zip(*failing_test_cases)
255255

256-
plotters = [Axes.scatter, Axes.bar,
256+
# plotters = [Axes.scatter, Axes.bar,
257+
# pytest.param(Axes.plot, marks=pytest.mark.xfail)]
258+
plotters = [Axes.bar,
257259
pytest.param(Axes.plot, marks=pytest.mark.xfail)]
258260

259261
@pytest.mark.parametrize("plotter", plotters)

0 commit comments

Comments
 (0)