Merge pull request #771 from 2xB/logscale_noruntimewarning
No warning for arrays with zeros in logscale
This commit is contained in:
commit
e338447c37
@ -514,11 +514,13 @@ class PlotDataItem(GraphicsObject):
|
||||
# Ignore the first bin for fft data if we have a logx scale
|
||||
if self.opts['logMode'][0]:
|
||||
x=x[1:]
|
||||
y=y[1:]
|
||||
if self.opts['logMode'][0]:
|
||||
x = np.log10(x)
|
||||
if self.opts['logMode'][1]:
|
||||
y = np.log10(y)
|
||||
y=y[1:]
|
||||
|
||||
with np.errstate(divide='ignore'):
|
||||
if self.opts['logMode'][0]:
|
||||
x = np.log10(x)
|
||||
if self.opts['logMode'][1]:
|
||||
y = np.log10(y)
|
||||
|
||||
ds = self.opts['downsample']
|
||||
if not isinstance(ds, int):
|
||||
|
Loading…
Reference in New Issue
Block a user