summaryrefslogtreecommitdiff
path: root/silx/gui/plot3d/scene/primitives.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot3d/scene/primitives.py')
-rw-r--r--silx/gui/plot3d/scene/primitives.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/silx/gui/plot3d/scene/primitives.py b/silx/gui/plot3d/scene/primitives.py
index 7db61e8..b4c8e26 100644
--- a/silx/gui/plot3d/scene/primitives.py
+++ b/silx/gui/plot3d/scene/primitives.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2020 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -49,7 +49,7 @@ from . import event
from . import core
from . import transform
from . import utils
-from .function import Colormap, Fog
+from .function import Colormap
_logger = logging.getLogger(__name__)
@@ -367,7 +367,7 @@ class Geometry(core.Elem):
min_ = numpy.nanmin(attribute, axis=0)
max_ = numpy.nanmax(attribute, axis=0)
else:
- min_, max_ = numpy.zeros((2, attribute.shape[1]), dtype=numpy.float32)
+ min_, max_ = numpy.zeros((2, attribute.shape[1]), dtype=numpy.float32)
toCopy = min(len(min_), 3-index)
if toCopy != len(min_):
@@ -2077,7 +2077,7 @@ class _Image(Geometry):
self._update_texture = True
# By updating the position rather than always using a unit square
# we benefit from Geometry bounds handling
- self.setAttribute('position', self._UNIT_SQUARE * self._data.shape[:2])
+ self.setAttribute('position', self._UNIT_SQUARE * (self._data.shape[1], self._data.shape[0]))
self.notify()
def getData(self, copy=True):
@@ -2188,7 +2188,7 @@ class _Image(Geometry):
gl.glUniform1f(program.uniforms['alpha'], self._alpha)
shape = self._data.shape
- gl.glUniform2f(program.uniforms['dataScale'], 1./shape[0], 1./shape[1])
+ gl.glUniform2f(program.uniforms['dataScale'], 1./shape[1], 1./shape[0])
gl.glUniform1i(program.uniforms['data'], self._texture.texUnit)