Skip to content

vcs cannot go back into interact mode #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chaosphere2112 opened this issue Nov 23, 2016 · 13 comments
Closed

vcs cannot go back into interact mode #86

chaosphere2112 opened this issue Nov 23, 2016 · 13 comments

Comments

@chaosphere2112
Copy link
Contributor

In [1]: dv3d = vcs.get3d_scalar('Hovmoller3D')

In [2]: x.plot(s,dv3d)
Warning, can't open data file 'None'
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0)) 
Out[2]: <vcs.displayplot.Dp at 0x11c48f320>

In [3]: x.interact()
/lgm/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py:87: UserWarning: Press 'Q' to exit interactive mode and continue script execution
  warnings.warn("Press 'Q' to exit interactive mode and continue script execution")
 saved state data to file  <closed file '/lgm/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/DV3D/data/state.txt', mode 'w' at 0x11c47dc90>

In [3]: dv3d.list()
 ---------- DV3D (Gfdv3d) member (attribute) listings ---------
name = Hovmoller3D
axes = xyt
ToggleVolumePlot = None
BasemapOpacity = '[0.5]'
Camera = "{'Position': (-262.50460102175333, -326.28088967728246, 340.92831427414325), 'ViewUp': (-0.019506706986772843, 0.7297785655923166, 0.6834052484321093), 'FocalPoint': (0.0, 0.0, 0.0)}"
PointSize = None
Configure = None
ScaleColormap = '[0.0, 100.0, 1]'
ChooseColormap = None
ToggleSurfacePlot = None
SliceThickness = None
ScaleOpacity = '[1.0, 1.0]'
Colorbar = None
ToggleClipping = None
Animation = '[0.0]'
ZSlider = '( [0.31786257636913323], vcs.on )'
IsosurfaceValue = '[50.0]'
YSlider = '[-90.0]'
ScaleTransferFunction = '[0.0, 100.0, 1]'
VerticalScaling = '[1.0]'
XSlider = '[-180.0]'
ToggleSphericalProj = None

In [4]: dv3d.ToggleSurfacePlot = vcs.on

In [5]: x.interact()

At that point resizing the windows hangs the system comletely

Migrated from: CDAT/cdat#1295

@durack1
Copy link
Member

durack1 commented Apr 13, 2017

@doutriaux1 I am hitting a similar problem with vcs plots and x.interact() preventing me from being able to close the opened canvas.. The only path forward is to kill the active ipython session - this is bad

@doutriaux1
Copy link
Contributor

@durack1 if you have x.interact() you then need to hit Q while the windo is active to keep going. Are you doing this?

@durack1
Copy link
Member

durack1 commented Apr 13, 2017

@doutriaux1 yep, hitting 'Q' returns the focus back to the console, but the canvas becomes unusable.. It responds to an x.clear(), but cannot be closed.. It becomes a zombie canvas.. It won't even close when hitting the window 'X' too..

@doutriaux1
Copy link
Contributor

let's take a look next week

@durack1 durack1 changed the title dv3d cannot go back into interact mode vcs cannot go back into interact mode Apr 26, 2017
@durack1
Copy link
Member

durack1 commented Apr 26, 2017

@doutriaux1 this was the issue we were discussing, however, it's vcs not dv3d that is having the issue, I have renamed the issue to reflect this

@durack1
Copy link
Member

durack1 commented May 3, 2017

@doutriaux1 @danlipsa @aashish24 just fyi, this bug is preventing me from using vcs in interactive data discovery.. Which is really unfortunate, as I would prefer to use it.. Matplotlib on the other hand can successfully open and close interactive plotting windows, so I'm forced to use that instead

@danlipsa
Copy link
Contributor

danlipsa commented May 4, 2017

@durack1 Can you provide us the steps to reproduce the problem? I tried what Sam wrote but I cannot reproduce the problem.

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@durack1
Copy link
Member

durack1 commented May 10, 2017

@danlipsa I haven't checked this in a v2.10 ipython console (importantly it has to be a non-nox version), but this is what didn't work for me last time:

import vcs
import numpy

mat = np.zeros([5,5])
x = vcs.init()
y = vcs.init()
x.meshfill(mat)
y.meshfill(mat)
x.clear()
y.clear()
x.close() ; # This leads to a zombie window that doesn't die until the ipython session is killed
y.close() ; # Same here

@danlipsa
Copy link
Contributor

@durack1 @doutriaux1 With 2.10 I get

>>> x.meshfill(mat)
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/danlipsa/anaconda/envs/2.10/lib/python2.7/site-packages/vcs/Canvas.py", line 1385, in meshfill
    arglist = _determine_arg_list('meshfill', args)
  File "/Users/danlipsa/anaconda/envs/2.10/lib/python2.7/site-packages/vcs/Canvas.py", line 264, in _determine_arg_list
    raise vcsError("Meshfill requires 2 slab if first slab doesn't have a "
vcs.error.vcsError: Meshfill requires 2 slab if first slab doesn't have a Rectilinear, Curvilinear or Generic Grid type

@durack1
Copy link
Member

durack1 commented May 11, 2017

@danlipsa try this:

(uvcdat2100) duro@ocean:[160427_CMIP6_Forcing]:[5711]> ipython
Python 2.7.13 | packaged by conda-forge | (default, May  2 2017, 12:48:11)
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
In [1]: import cdms2,vcs
In [2]: f = '/export/durack1/170123_CDAT_scripts/siconc_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-1_gn_187001.nc'
In [3]: fH = cdms2.open(f)
In [4]: var = fH('siconc')
In [5]: x = vcs.init()
In [6]: y = vcs.init()
In [7]: x.meshfill(var)
Out[7]: <vcs.displayplot.Dp at 0x7f2a8d2a2050>
In [8]: y.meshfill(var)
Out[8]: <vcs.displayplot.Dp at 0x7f2ace8ce6e0>
In [9]: x.clear()
In [10]: y.clear()
In [11]: x.close() ; # This leads to a zombie window that doesn't die until the ipython session is killed
In [12]: y.close() ; #Same here
In [13]: import cdat_info
In [14]: cdat_info.version()
Out[14]: ['', '2.8.10']

And the file:
siconc_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-1_gn_187001.zip

@durack1
Copy link
Member

durack1 commented May 11, 2017

@doutriaux1 is cdat_info.version() - > ['', '2.8.10'] right? I thought the latest release should be v2.10.0 instead..?

@doutriaux1
Copy link
Contributor

@durack1 nice catch I'll patch this, right away.

@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1
Copy link
Contributor

duplicate of CDAT/dv3d#4

@downiec downiec modified the milestones: 8.2, 8.2.1 Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants