-
Notifications
You must be signed in to change notification settings - Fork 12
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
Plots won't display when using jupyter notebook in vscode #37
Comments
Thank you for reporting the issue. Unfortunately, I'm not a VSCode user and have only tested the plugin in Jupyter Notebook and Lab. My hunch is that VSCode is running the notebooks slightly differently and that's maybe why nothing appears. Does VSCode have a console of some sort where errors are logged? It's hard to tell without any error message what might cause the issue. |
An abbreviated version of what I'm seeing in the VSCode dev tools menu looks like this:
|
Oh that mean that the widget wasn't installed/registered properly. I.e., what the error is saying that the Python widget v0.7.1 is not finding a corresponding front-end widget with v0.7.1. How did you install jupyter-widget for VSCode? (Sorry this might be a dump question but I'm a SublimeText user) |
I tried to get jupyter-scatter to run with VS Code the other day and can confirm that, while ipywidgets work, jupyter-scatter does not work. At this point I am not sure though what causes the issue but I suspect that jupyter-scatter might be incompatible for some unknown reason with VS Codes ipywidget helper. |
It seems jupyter-scatter just stopped working in VS Code. Different from this original issue, but re-opening to make it easier to track/find. Some kind of regl error. To reproduce: python -m venv .venv
source .venv/bin/activate
pip install jupyter jupyter-scatter
code . # open VS Code In VS Code, import jscatter
import numpy as np
x = np.random.rand(500)
y = np.random.rand(500)
jscatter.plot(x, y) Browser console (to open,
|
Thanks for beating me to making an issue 🙂 |
Thanks for reporting! I suspect that either the width, height, or both are zero for a split second or that this is some kind of race condition during the initial rendering. Either way it sounds like a regl-scatterplot bug. I don't know when I'll get to due to my parental leave, so please go ahead and investigate if you have some time. But I'll try to look once I have the chance. |
This is wild... somehow when VSCode executes the cell, the screen width and height is reported to be |
I use VSCode when developing and running jupyter notebooks. However, I'm not able to get jupyter-scatter plots to display here. They do work when running a jupyter notebook in the browser. I have not tested jupyterlab functionality.
Here's a small reproducible test case:
This will return an empty cell. When printing the
fig
variable, it seems to have been created properly, but does not display.print(fig.show())
produces:To verify that ipywidgets still work, I made and displayed the following simple widget. This worked as expected.
The text was updated successfully, but these errors were encountered: