-
Notifications
You must be signed in to change notification settings - Fork 30
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
VS Code feature request: Inline plots that respect chunk dimension options #287
Comments
Unfortunately we are sending plots to the R extension so can't directly manipulate the figure size as we can in RStudio. If there is a way to do this that we aren't aware of we are all ears to implement it! |
I think this would be solved if there was a way to execute R via jupyter (#204). |
@andrewheiss could the use of |
Since the plot appears in a separate window, changing the |
@andrewheiss I used the mentioned option to shrink images in docx output since fig.height etc. did not work (as opposed to bookdown). Your description of the window-output makes perfectly sense. In VSCode I just resize that window, though. |
Could you send the R code to usr/bin/Rscript via the terminal instead of to R? Then you could catch the output and render inline? Or does either vscode or the design philosophy of knitr prevent this? |
I'm bumping up this issue. I recently switched entirely to vscode for all my R and quatro coding, and the ability to render code output and plots is what I miss the most from Rstudio. Could the visual editor somehow take advantage of the the Notebook API: https://code.visualstudio.com/api/extension-guides/notebook which allows to serialize code chunk outputs, save them to disk and render them? |
In RStudio, chunks that generate plots follow the dimensions specified in the chunk options (currently only with in-chunk options, but eventually hopefully also with YAML-style chunk options too)
In VS Code, images do not appear inline and instead either show up in a separate panel (if {httpgd} is installed), or in a separate window:
This is also the case when using the visual editor mode:
It would be helpful for figuring out figure dimensions for documents if plots could appear using the specified chunk options. But that also might just be a limitation of VS Code and/or radian and/or {httpgd} and/or something else.
The text was updated successfully, but these errors were encountered: