vscode-R
vscode-R copied to clipboard
Fail to show further plots after closing R Plot
After plotting many graphs, when I tried to plot again the R Plot panel no longer pop up. Even I managed to make R Plot panel appear again and delete or previous graph, the plot still wouldn't show in the panel.
Any suggestions?
plot(1:10)

Does "Open in external browser" show the plots correctly?
Does "Open in external browser" show the plots correctly?
They do initially. But after ploting fails, "Open in external browser" no longer works too, stuck like below. It happened again just now.

It just happened again. However this time, I was able to open the graph just by re-opening it from the browser history. The graph was actually on it. Upon re-opening, the following error message appeared in the terminal, which might indicate why plot panel did not pop up when entering the code from editor or terminal initially.
r$> Error in grid.Call.graphics(C_upviewport, as.integer(n)) :
cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)
When making the new plot, those plots will keep showing in the the R Plot tab. But if close the tab, it won't automatically open it anymore.
@ManuelHentschel @nx10 Do you think the problem is in vscode-R plot viewer or the httpgd backend?
My first guess would be the httpgd backend, since the problem also affects the external browser and produces errors in R (the vscode viewer only interacts with httpgd through http/ws, so it shouldn't be able to cause these errors).
Though it could be that e.g. the dynamic resizing from the plot viewer requests too many updates and stalls the R process.
This could be a backend problem. @Fred-Wu can you provide plotting code to recreate the issue? What version of httpgd and R are you using?
This could be a backend problem. @Fred-Wu can you provide plotting code to recreate the issue? What version of httpgd and R are you using?
I am on R version 4.1.0 and httpgd version 1.1.1.
Sorry, I don't think I am able to provide codes to reproduce the issue. It happened just after keep plotting a bunch of different figures, usually 3-D plots or maps. It's pretty random.
Thank you for your reply.
Sorry, I don't think I am able to provide codes to reproduce the issue. It happened just after keep plotting a bunch of different figures, usually 3-D plots or maps. It's pretty random.
I understand. But I need some more information to investigate this, as I have never seen this error. What packages do you use to plot? Are there multiple plots on one page?
I sometimes encounter this too, but it is quite hard to reliably reproduce. I'll see if I could find a way to reproduce it somehow.
This issue is stale because it has been open for 365 days with no activity.
If this still happens with the upcoming dev version of httpgd 2.0 let me know (https://github.com/nx10/httpgd/pull/111)
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.