-
Notifications
You must be signed in to change notification settings - Fork 13
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
When running plot() function in a Jupyter Notebook, a greyed out window appears. #383
Comments
Do we need to detect that we're running in a Jupyter notebook somehow, or can the default just be |
no default needs to be bg=False as now. Look for the bit of code I added to detect notebook, for sidecar |
Actually the code should already be in place (I thought I did code this): https://github.com/CDAT/vcs/blob/master/vcs/Canvas.py#L931-L935 I wo der why it's not picking it up |
@scottwittenburg is it related to the new vtk-cdat ? |
I remember seeing a window even with mesalib, maybe it's a similar issue? |
I think I'll need some instructions on how to reproduce this if I'm to be of any help. |
according to @downiec when in a jupyternotebook with the non-mesa env (py3) |
we do not want the window appear, hence bg=True |
Could it be because my conda environment? I just remembered I'm using the old conda environment because that's the one that's currently working. I'll let you know |
Sounds good, thanks @downiec. |
What vcs version do I need? I tried pulling from master and then running python setup.py install, but now I'm getting an error and it won't plot anything. I emailed a screenshot. |
I noticed if I run this command: |
Strange... if I run the command, initially it will have the error, but if I keep running a few times (without changing the code or parameters), eventually it works correctly. Is it because something needs to be loaded in the back end? |
One last comment. In the JupyterLab Notebook, first time I run the cell, I get: |
Sorry @downiec, I saw your email about this before I got here, so I responded there. Basically, the
If you have more than one for |
@scottwittenburg Thanks for the response, I went ahead and removed the vcs egg files like you said, and then I ran python setup.py install. That all fixed the error, thanks! Unfortunately it doesn't resolve the greyed out window issue. Basically, if I run the following in a Jupyter Lab Notebook: |
@downiec Can you run the following in the same environment you just cleaned up, and see if the window pops up? import vcs
canvas = vcs.init(bg=1)
canvas.plot([1, 2, 3, 4, 5])
canvas.png("simple.png") Let me know what happens, thanks. |
I didn't see anything get plotted, but the grey window pops whether I run the code in a JupyterLab notebook, or I run it from Python in the console. Also a png named 'simple.png' was created. Also another thing I notice is the grey window usually pops up after the data has been plotted. Sometimes almost a full second after the graph has already been plotted in the sidecar. |
If vcs.init() is run in a Jupyter notebook, it should automatically detect and have bg=true to avoid the greyed out window when sidecar is used in a Jupyter Notebook.
The text was updated successfully, but these errors were encountered: