NASA-DEVELOP / VOCAL

Visualization of CALIPSO (VOCAL). A CALIPSO Cross Cutting tool for visualizing data
http://nasa-develop.github.io/VOCAL/
Other
37 stars 14 forks source link

Dynamically resize shape subplot to avoid skewing #15

Open Syntaf opened 9 years ago

Syntaf commented 9 years ago

The current extraction tool displays a subplot containing only the bounds given by the shape selected. The problem is that with narrow shapes, the image is very skewed due to a fixed window size in ExtractDialog. If the window could resize to some scale of the shape during the __init__ function, that avoid this problem.

To view what problem I'm talking about:

skewed

stapleCamel commented 9 years ago

extractdialog now calculates the shape's aspect ratio and produces a window based on the aspect ratio. The current preset ratios are arbitrary and need to further adjusted to eliminate skewing. Also, there's a bug when clicking on anything besides the close button of the subplot.

stapleCamel commented 9 years ago

The bug appears to be coming from self.canvas.show() on line 178 in extractdialog.py. The program for some reason suspends itself at that line.

Syntaf commented 9 years ago

An idea may be to refactor extract dialog so we have access to the display coordinates of shapes, and we can simply scale that shape into the extract window. This would required some calls to the matplotlib backend and other such. However this is not a current big issue so this can remain unimplemented until we finish our other business

Here's how I believe the current solution should work:

Syntaf commented 9 years ago

Implementation of this feature should be done on aspect_ratio