summaryrefslogtreecommitdiff
path: root/silx/gui/plot/items
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
commite19c96eff0c310c06c4f268c8b80cb33bd08996f (patch)
treef2b4a365ed899be04766f3937bcc2d58d22be065 /silx/gui/plot/items
parentbfa4dba15485b4192f8bbe13345e9658c97ecf76 (diff)
New upstream version 0.6.1+dfsg
Diffstat (limited to 'silx/gui/plot/items')
-rw-r--r--silx/gui/plot/items/axis.py2
-rw-r--r--silx/gui/plot/items/core.py7
-rw-r--r--silx/gui/plot/items/curve.py3
3 files changed, 6 insertions, 6 deletions
diff --git a/silx/gui/plot/items/axis.py b/silx/gui/plot/items/axis.py
index 56fd762..ff36512 100644
--- a/silx/gui/plot/items/axis.py
+++ b/silx/gui/plot/items/axis.py
@@ -220,7 +220,7 @@ class Axis(qt.QObject):
for item in self._plot._getItems(withhidden=True):
item._updated()
self._plot._invalidateDataRange()
- self._plot.resetZoom()
+ self._plot._forceResetZoom()
self.sigScaleChanged.emit(self._scale)
if emitLog:
diff --git a/silx/gui/plot/items/core.py b/silx/gui/plot/items/core.py
index 0f4ffb9..34ac700 100644
--- a/silx/gui/plot/items/core.py
+++ b/silx/gui/plot/items/core.py
@@ -543,7 +543,7 @@ class ColorMixIn(object):
def getColor(self):
"""Returns the RGBA color of the item
- :rtype: 4-tuple of float in [0, 1]
+ :rtype: 4-tuple of float in [0, 1] or array of colors
"""
return self._color
@@ -566,9 +566,8 @@ class ColorMixIn(object):
else: # Array of colors
assert color.ndim == 2
- if self._color != color:
- self._color = color
- self._updated(ItemChangedType.COLOR)
+ self._color = color
+ self._updated(ItemChangedType.COLOR)
class YAxisMixIn(object):
diff --git a/silx/gui/plot/items/curve.py b/silx/gui/plot/items/curve.py
index ce7f03e..0ba475d 100644
--- a/silx/gui/plot/items/curve.py
+++ b/silx/gui/plot/items/curve.py
@@ -31,6 +31,7 @@ __date__ = "06/03/2017"
import logging
+import numpy
from .. import Colors
from .core import (Points, LabelsMixIn, ColorMixIn, YAxisMixIn,
@@ -75,7 +76,7 @@ class Curve(Points, ColorMixIn, YAxisMixIn, FillMixIn, LabelsMixIn, LineMixIn):
xFiltered, yFiltered, xerror, yerror = self.getData(
copy=False, displayed=True)
- if len(xFiltered) == 0:
+ if len(xFiltered) == 0 or not numpy.any(numpy.isfinite(xFiltered)):
return None # No data to display, do not add renderer to backend
return backend.addCurve(xFiltered, yFiltered, self.getLegend(),