Merge pull request #771 from 2xB/logscale_noruntimewarning

No warning for arrays with zeros in logscale
This commit is contained in:
Ogi Moore 2019-05-23 23:24:03 -07:00 committed by GitHub
commit e338447c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,6 +515,8 @@ class PlotDataItem(GraphicsObject):
if self.opts['logMode'][0]:
x=x[1:]
y=y[1:]
with np.errstate(divide='ignore'):
if self.opts['logMode'][0]:
x = np.log10(x)
if self.opts['logMode'][1]: