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 8928311

Browse filesBrowse files
committed
added masking of non finite values in pcolormesh
1 parent 838502e commit 8928311
Copy full SHA for 8928311

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4983,6 +4983,7 @@ def _pcolorargs(funcname, *args, **kw):
49834983
else:
49844984
X, Y = np.meshgrid(np.arange(numCols + 1),
49854985
np.arange(numRows + 1))
4986+
C = cbook.safe_masked_invalid(C)
49864987
return X, Y, C
49874988

49884989
if len(args) == 3:
@@ -5015,6 +5016,7 @@ def _pcolorargs(funcname, *args, **kw):
50155016
' X (%d) and/or Y (%d); see help(%s)' % (
50165017
C.shape, Nx, Ny, funcname))
50175018
C = C[:Ny - 1, :Nx - 1]
5019+
C = cbook.safe_masked_invalid(C)
50185020
return X, Y, C
50195021

50205022
@unpack_labeled_data(label_namer=None)

0 commit comments

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