Commit dbcdf7ec authored by Luke Campagnola's avatar Luke Campagnola
Browse files

little fix --plots may contain nans now

parent fac29dc9
......@@ -376,8 +376,9 @@ class PlotCurveItem(GraphicsObject):
if self.xData is None:
return (None, None)
if self.xDisp is None:
x = self.xData
y = self.yData
nanMask = isnan(self.xData) | isnan(self.yData)
x = self.xData[~nanMask]
y = self.yData[~nanMask]
ds = self.opts['downsample']
if ds > 1:
x = x[::ds]
......@@ -592,6 +593,8 @@ class PlotCurveItem(GraphicsObject):
xmax = x.max() + pixels[0].x() * lineWidth
ymin = y.min() - abs(pixels[1].y()) * lineWidth
ymax = y.max() + abs(pixels[1].y()) * lineWidth
return QtCore.QRectF(xmin, ymin, xmax-xmin, ymax-ymin)
def paint(self, p, opt, widget):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment