grblogtools plotting problems in VS Code
AnsweredI´m experiencing some issues with the interactive plotting functions in grblogtools.
When I run the example notebook from github, the glt.plot(summary) runs without error, but there is no figure generated.
My guess is that this is a problem related to plotly renderers, but I have not been able to find a solution. I am running the notebook using the Jupyter extension in VS Code, would be great to hear if anybody has seen the same issue and perhaps found a solution?
Best Regards,
Henrik
-
Hi Henrik!
The default behavior of \(\tt{glt.plot()}\) is to wait until the "type" of plot is selected before actually drawing the plot. You can shortcut this by specifying the "type" right away when calling the function:
glt.plot(summary, type="box")
I just tested the notebook in VSCode using the built-in notebook view and right after selecting a plot type, the plot appeared below the selection widget.
Cheers,
Matthias0 -
Hello Matthias!
Thanks for your reply. My problem is that the selection widgets for plot type etc. are not appearing. Specifying the type "box" gives a plot, but I am still missing the dropdown selections for x,y, color etc...
This is what it looks like when I run it:
/Henrik
0 -
Hmm, interesting. Until now, I have only seen cases with the plots not appearing despite selecting everything in the widget.
I suppose this is a VSCode/Jupyter issue. We are using ipywidgets for the widgets - maybe you need to update that package? If that does not work, I suggest working with the notebook in the browser - this is the most stable way for all those visualizations. Both VSCode and Jupyter are continuously evolving, so there is always the probability of something breaking.
Cheers,
Matthias0 -
Hi, I have the same problem. I upgrade all packages but it does not work. I copy the file on google colab and it works.
0 -
The VS Code Jupyter extension has only very very recently started supporting IPyWidgets 8.* - previously it was only up to IPyWidgets 7.*
- Riley1 -
I tried again today after updating VS Code and sure enough it works fine now! Thanks!
0
Please sign in to leave a comment.
Comments
6 comments