Carlos Pascual
2011-06-16 15:22:41 UTC
I am using guiqwt 2.1.3 and I found a strange bug in XYImageItem:
If the x values are very large, the image disapears/appears depending on the
panning and the zoom.
For demonstration see the following function:
++++++++++++++++++++++++++++++
def xyimagebug(offset):
from guiqwt.plot import ImageDialog
from taurus.qt.extra_guiqwt.builder import make
import numpy
import guidata
app = guidata.qapplication()
data = numpy.random.rand(100,100)
x = numpy.arange(100)+offset
y = numpy.arange(100)
image = make.xyimage(x,y,data=data)
win = ImageDialog()
plot = win.get_plot()
plot.add_item(image)
plot.select_item(image) #this helps in seeing where the image should be
win.exec_()
++++++++++++++++++++++++++++++++++
If called as "xyimagebug(1e4)", everything works as expected (see ok.png
attached). You can pan and zoom in/out without problems...
...but if launched as "xyimagebug(1e9)", you will see that either:
a) the image does not appear at all (see bad2.png)
b) a wrong image appears (see bad1.png)
c) the image appears/disapears when panning or zooming in/out
Unfortunately this is a big problem for me because I want to represent
timestamps in the x scale
Do you know of any fix/workaround?
ps: I tried using ints instead of doubles for "data" and "x", but the problem
still occurs
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
If the x values are very large, the image disapears/appears depending on the
panning and the zoom.
For demonstration see the following function:
++++++++++++++++++++++++++++++
def xyimagebug(offset):
from guiqwt.plot import ImageDialog
from taurus.qt.extra_guiqwt.builder import make
import numpy
import guidata
app = guidata.qapplication()
data = numpy.random.rand(100,100)
x = numpy.arange(100)+offset
y = numpy.arange(100)
image = make.xyimage(x,y,data=data)
win = ImageDialog()
plot = win.get_plot()
plot.add_item(image)
plot.select_item(image) #this helps in seeing where the image should be
win.exec_()
++++++++++++++++++++++++++++++++++
If called as "xyimagebug(1e4)", everything works as expected (see ok.png
attached). You can pan and zoom in/out without problems...
...but if launched as "xyimagebug(1e9)", you will see that either:
a) the image does not appear at all (see bad2.png)
b) a wrong image appears (see bad1.png)
c) the image appears/disapears when panning or zooming in/out
Unfortunately this is a big problem for me because I want to represent
timestamps in the x scale
Do you know of any fix/workaround?
ps: I tried using ints instead of doubles for "data" and "x", but the problem
still occurs
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+