Skip to content

Commit

Permalink
Optimized plotting of NaNs in QuadMesh
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 8, 2018
1 parent 8b62fe9 commit 9a65e73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holoviews/plotting/bokeh/raster.py
Expand Up @@ -194,7 +194,12 @@ def get_data(self, element, ranges, style):
for d in dims]
X, Y = colormesh(X, Y)
zvals = zdata.T.flatten() if self.invert_axes else zdata.flatten()
data = {'xs': list(X), 'ys': list(Y), z.name: zvals}
XS, YS = [], []
for x, y, zval in zip(X, Y, zvals):
if np.isfinite(zval):
XS.append(x)
YS.append(y)
data = {'xs': XS, 'ys': YS, z.name: zvals[np.isfinite(zvals)]}
else:
xc, yc = (element.interface.coords(element, x, edges=True),
element.interface.coords(element, y, edges=True))
Expand Down

0 comments on commit 9a65e73

Please sign in to comment.