Merge pull request #526 from kokokostation/develop

Added essential if.
This commit is contained in:
Luke Campagnola 2018-04-25 16:26:52 -07:00 committed by GitHub
commit d1794e4e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -649,6 +649,9 @@ class ScatterPlotItem(GraphicsObject):
d = d[mask] d = d[mask]
d2 = d2[mask] d2 = d2[mask]
if d.size == 0:
return (None, None)
if frac >= 1.0: if frac >= 1.0:
self.bounds[ax] = (np.nanmin(d) - self._maxSpotWidth*0.7072, np.nanmax(d) + self._maxSpotWidth*0.7072) self.bounds[ax] = (np.nanmin(d) - self._maxSpotWidth*0.7072, np.nanmax(d) + self._maxSpotWidth*0.7072)
return self.bounds[ax] return self.bounds[ax]