From b09862d2c14fa21a991d68c4ae0427a4c170d97b Mon Sep 17 00:00:00 2001 From: Luke Campagnola <> Date: Mon, 23 Apr 2012 10:10:03 -0400 Subject: [PATCH] bugfix: PlotDataItem now checks for inf as well as nan in data. --- graphicsItems/PlotDataItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphicsItems/PlotDataItem.py b/graphicsItems/PlotDataItem.py index bb249bf3..8c10512b 100644 --- a/graphicsItems/PlotDataItem.py +++ b/graphicsItems/PlotDataItem.py @@ -389,7 +389,7 @@ class PlotDataItem(GraphicsObject): if self.xData is None: return (None, None) if self.xDisp is None: - nanMask = np.isnan(self.xData) | np.isnan(self.yData) + nanMask = np.isnan(self.xData) | np.isnan(self.yData) | np.isinf(self.xData) | np.isinf(self.yData) if any(nanMask): x = self.xData[~nanMask] y = self.yData[~nanMask]