CDAT / cdat

Community Data Analysis Tools
Other
175 stars 68 forks source link

Exception in Scatter Plot: ZeroDivisionError #1280

Closed vvpalav closed 5 years ago

vvpalav commented 9 years ago

1) Load u, v and plot with Scatter plot. 2) Click on Next button (">") for prev variable and following exception comes up. Entire application become unresponsive.

Traceback (most recent call last):
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1725, in clicked
    cellWidget.updateContents(cellWidget.inputPorts,True)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/vistrails/vistrails/packages/uvcdat_cdms/init.py", line 1450, in updateContents
    self.canvas.plot(cgm, *args, **kwargs)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 2617, in plot
    a = self.__plot( arglist, keyargs )
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3693, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py", line 498, in plot
    returned.update(self.plot1D(data1,data2,tpl,gm))
  File /Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py", line 582, in plot1D
    self.canvas.plot(m,donotstoredisplay=True)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 2617, in plot
    a = self.__plot(*arglist, **keyargs)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3693, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py", line 486, in plot
    ren = self.fitToViewport(act,gm.viewport,wc=gm.worldcoordinate,geo=geo,priority=gm.priority)
  File "/Users/vinayakpalav/Documents/uvcdat_2_2/15-05-05/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py", line 1765, in fitToViewport
    xScale = vRatio*wRatio/dRatio
ZeroDivisionError: float division by zero

Before: Click highlighted button after plotting scatter plot with u and v

screen shot 2015-05-05 at 8 58 20 pm

After button is clicked:

screen shot 2015-05-05 at 8 52 47 pm

alliepiper commented 9 years ago

Is there documentation for the GUI around? I found this, but it's very incomplete:

https://github.com/UV-CDAT/uvcdat/wiki/UVCDAT-GUI-Tutorials

I'm trying to figure out what that button does so I can write a vcs script to reproduce this without the GUI.

alliepiper commented 9 years ago

@doutriaux1 @vvpalav

alliepiper commented 9 years ago

I tried checking the "View Plot Source", but it doesn't change as a result of the button press.

remram44 commented 9 years ago

Is there documentation for the GUI around?

I agree, we desperately need this. The redesign effort could really use at least a list of requirements.

This button says "move to next dimensions", here's the code. As for the "view plot source", anything that doesn't change provenance info won't be reflected there; in this case I think that is fine.

alliepiper commented 9 years ago

@sankhesh will take a look, but we'll likely need help from @doutriaux1 to track this down :+1: