diff options
Diffstat (limited to 'silx/gui/plot3d/items/mixins.py')
-rw-r--r-- | silx/gui/plot3d/items/mixins.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/silx/gui/plot3d/items/mixins.py b/silx/gui/plot3d/items/mixins.py index 40b8438..b355627 100644 --- a/silx/gui/plot3d/items/mixins.py +++ b/silx/gui/plot3d/items/mixins.py @@ -38,6 +38,7 @@ from silx.math.combo import min_max from ...plot.items.core import ItemMixInBase from ...plot.items.core import ColormapMixIn as _ColormapMixIn from ...plot.items.core import SymbolMixIn as _SymbolMixIn +from ...plot.items.core import ComplexMixIn as _ComplexMixIn from ...colors import rgba from ..scene import primitives @@ -139,8 +140,9 @@ class ColormapMixIn(_ColormapMixIn): self._dataRange = dataRange - if self.getColormap().isAutoscale(): - self._syncSceneColormap() + colormap = self.getColormap() + if None in (colormap.getVMin(), colormap.getVMax()): + self._colormapChanged() def _getDataRange(self): """Returns the data range as used in the scene for colormap @@ -173,6 +175,18 @@ class ColormapMixIn(_ColormapMixIn): self.__sceneColormap.range_ = range_ +class ComplexMixIn(_ComplexMixIn): + __doc__ = _ComplexMixIn.__doc__ # Reuse docstring + + _SUPPORTED_COMPLEX_MODES = ( + _ComplexMixIn.ComplexMode.REAL, + _ComplexMixIn.ComplexMode.IMAGINARY, + _ComplexMixIn.ComplexMode.ABSOLUTE, + _ComplexMixIn.ComplexMode.PHASE, + _ComplexMixIn.ComplexMode.SQUARE_AMPLITUDE) + """Overrides supported ComplexMode""" + + class SymbolMixIn(_SymbolMixIn): """Mix-in class for symbol and symbolSize properties for Item3D""" |