-
Notifications
You must be signed in to change notification settings - Fork 125
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
Plotting in an interactive loop does not render all plots. #813
Comments
I could reproduce this. It is not related to vscode-R but how httpgd triggers plot update via interactive user input. In a vanilla R outside vscode, run R and create an httpgd device: httpgd::hgd()
httpgd::hgd_browse() Then a web plot viewer is open in the browser. Run your code, and you will find that the same problem persists. |
Please file an issue at https://github.com/nx10/httpgd/issues. |
But this issue is present with the vscode-R extension, even when I am not using httpgd. |
vscode-R by default uses a png device replayed in the task callback on top-level user input. It is a known limitation documented at https://github.com/REditorSupport/vscode-R/wiki/Plot-viewer#png-file. Using httpgd is always recommended. |
Thanks @renkun-ken! That makes sense. |
Describe the bug
I have a package that has some interactivity, that depends on being able to display plots in a loop. In RStudio, all plots display, but in the vscode extension (both the base plotter, and the httpgd backend), only the first (and the last plot when you quit the loop) display.
To Reproduce
Create an R session, the following code reproduces this, but only the first plot displays interactivly.
Do you want to fix by self? (We hope your help!)
I do not think I have the knowledge of VScode plugins to fix this myself.
Expected behavior
I would expect all of the plots to display interactively.
Screenshots
If applicable, add screenshots to help explain your problem.
You can show the keybord contents by pressing
F1
andDeveloper: toggle screencast mode
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: