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

Appearance settings

Commit c932a9e

Browse filesBrowse files
committed
:s/plotinvalid/plotnonfinite.
The name is a reference to the standard isfinite() function.
1 parent 6105980 commit c932a9e
Copy full SHA for c932a9e

File tree

Expand file treeCollapse file tree

4 files changed

+10
-9
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+10
-9
lines changed

‎doc/api/next_api_changes/2018-11-14-AL-scatter.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/2018-11-14-AL-scatter.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ by `PathCollection.get_array`)
99

1010
Such points are now included, but masked out by returning a masked array.
1111

12-
If the *plotinvalid* kwarg to `~.Axes.scatter` is set, then points with
12+
If the *plotnonfinite* kwarg to `~.Axes.scatter` is set, then points with
1313
nonfinite values are plotted using the bad color of the `PathCollection`\ 's
1414
colormap (as set by `Colormap.set_bad`).

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4180,7 +4180,7 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xshape, yshape,
41804180
label_namer="y")
41814181
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
41824182
vmin=None, vmax=None, alpha=None, linewidths=None,
4183-
verts=None, edgecolors=None, *, plotinvalid=False,
4183+
verts=None, edgecolors=None, *, plotnonfinite=False,
41844184
**kwargs):
41854185
"""
41864186
A scatter plot of *y* vs *x* with varying marker size and/or color.
@@ -4257,8 +4257,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
42574257
For non-filled markers, the *edgecolors* kwarg is ignored and
42584258
forced to 'face' internally.
42594259
4260-
plotinvalid : boolean, optional, default: False
4261-
Set to plot valid points with invalid color, in conjunction with
4260+
plotnonfinite : boolean, optional, default: False
4261+
Set to plot points with nonfinite *c*, in conjunction with
42624262
`~matplotlib.colors.Colormap.set_bad`.
42634263
42644264
Returns
@@ -4314,7 +4314,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
43144314
c, edgecolors, kwargs, xshape, yshape,
43154315
get_next_color_func=self._get_patches_for_fill.get_next_color)
43164316

4317-
if plotinvalid and colors is None:
4317+
if plotnonfinite and colors is None:
43184318
c = np.ma.masked_invalid(c)
43194319
x, y, s, colors, edgecolors, linewidths = \
43204320
cbook._combine_masks(x, y, s, colors, edgecolors, linewidths)

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2835,12 +2835,13 @@ def quiverkey(Q, X, Y, U, label, **kw):
28352835
def scatter(
28362836
x, y, s=None, c=None, marker=None, cmap=None, norm=None,
28372837
vmin=None, vmax=None, alpha=None, linewidths=None, verts=None,
2838-
edgecolors=None, *, plotinvalid=False, data=None, **kwargs):
2838+
edgecolors=None, *, plotnonfinite=False, data=None, **kwargs):
28392839
__ret = gca().scatter(
28402840
x, y, s=s, c=c, marker=marker, cmap=cmap, norm=norm,
28412841
vmin=vmin, vmax=vmax, alpha=alpha, linewidths=linewidths,
2842-
verts=verts, edgecolors=edgecolors, plotinvalid=plotinvalid,
2843-
**({"data": data} if data is not None else {}), **kwargs)
2842+
verts=verts, edgecolors=edgecolors,
2843+
plotnonfinite=plotnonfinite, **({"data": data} if data is not
2844+
None else {}), **kwargs)
28442845
sci(__ret)
28452846
return __ret
28462847

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,7 @@ def test_scatter_invalid_color(self, fig_test, fig_ref):
17591759
# stamping fast path, which would result in slightly offset markers.
17601760
ax.scatter(range(4), range(4),
17611761
c=[1, np.nan, 2, np.nan], s=[1, 2, 3, 4],
1762-
cmap=cmap, plotinvalid=True)
1762+
cmap=cmap, plotnonfinite=True)
17631763
ax = fig_ref.subplots()
17641764
cmap = plt.get_cmap("viridis", 16)
17651765
ax.scatter([0, 2], [0, 2], c=[1, 2], s=[1, 3], cmap=cmap)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.