forked from IPKM/nmreval
weird bug for log-scaling fixed; fixes T248
This commit is contained in:
@ -179,8 +179,12 @@ class PlotItem(PlotDataItem):
|
||||
self.opts['linecolor'] = c.red(), c.green(), c.blue()
|
||||
|
||||
if self.symbol != SymbolStyle.No:
|
||||
c = self.opts['symbolBrush'].color()
|
||||
self.opts['symbolcolor'] = c.red(), c.green(), c.blue()
|
||||
brush = self.opts['symbolBrush']
|
||||
if isinstance(brush, tuple):
|
||||
self.opts['symbolcolor'] = brush
|
||||
else:
|
||||
c = brush.color()
|
||||
self.opts['symbolcolor'] = c.red(), c.green(), c.blue()
|
||||
|
||||
def __getitem__(self, item):
|
||||
return self.opts.get(item, None)
|
||||
@ -229,7 +233,7 @@ class PlotItem(PlotDataItem):
|
||||
else:
|
||||
return lc
|
||||
|
||||
def updateItems(self):
|
||||
def updateItems(self, styleUpdate=True):
|
||||
"""
|
||||
We override this function so that curves with nan/inf values can be displayed.
|
||||
Newer versions close this bug differently (https://github.com/pyqtgraph/pyqtgraph/pull/1058)
|
||||
@ -261,6 +265,7 @@ class PlotItem(PlotDataItem):
|
||||
# remove all bad values
|
||||
x = x[is_finite]
|
||||
y = y[is_finite]
|
||||
curveArgs['connect'] = 'all'
|
||||
self.curve.setData(x=x, y=y, **curveArgs)
|
||||
self.curve.show()
|
||||
else:
|
||||
|
Reference in New Issue
Block a user