You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be excellent if one could set the RStudio graphics device to generate plots as they would be generated by a non-interactive device with fixed dimensions, so that one could do iterative plot-making within the IDE rather than call png(), look at the outputs in another program, and then fiddle with font scaling, etc. and repeat. The plot could still display in the Plot or Viewer tab, but resizing that panel would not regenerate the plot - it would simply fit in the div with 100% width.
A possible API would be:
RStudioGD(fixed = TRUE, dev = "png", height = 3, width = 6, units = "in", dpi = 300)
If the user exports the image, the default size (for any filetype) would be the same as that in the plot window so the image looks the same.
The RStudioGD() options could also be set via the GUI, such as a drop-down menu in the plot panel.
Reacted by Robyn, F_Reinbott, CGMossa, Claire D. McWhite, Will Petry, Christophe Dervieux, Daniel Falbel, Thomas Lin Pedersen, E. David Aja, Jemma Stachelek and 12 more
@noamross Thank you for your suggestion—and also re-requesting it and providing a possible solution. We'll review this as we continue development of RStudio.
Activity
ronblum commentedon Mar 12, 2019
@noamross Thank you for your suggestion—and also re-requesting it and providing a possible solution. We'll review this as we continue development of RStudio.
stale commentedon Feb 5, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
jmcphers commentedon Feb 8, 2021
This talk might provide some helpful context: https://rstudio.com/resources/rstudioglobal-2021/aesthetically-automated-figure-production/
mikebessuille commentedon Feb 10, 2021
Or it might be this one, with fixed size plots: https://rstudio.com/resources/rstudioglobal-2021/a-new-paradigm-for-multifigure-coordinate-based-plotting-in-r/
mikebessuille commentedon Feb 17, 2022
See the related #4521
jmcphers commentedon Dec 2, 2022
noted elsewhere by @gadenbuie:
10 remaining items
save plot images at a chosen resolution, and record it on macOS
fix fixed plot size and export resolution review findings
write the jpeg density with its units, and clean up a failed rewrite
record image resolution only for saved files, and patch jpegs in place
refuse to save plot bitmaps over 100 megapixels
clamp a saved fixed plot size before converting it to int
publish a fixed-size plot to rpubs at its fixed size
render the zoomed fixed-size plot at the size it's shown
show the fixed plot size the session applies, and ignore clicks besid…
test scaled-down locator clicks, clicks beside the plot, and the zoom
raise save errors in the R API, keep large fixed sizes on export, and…
keep the copy dialogs on screen, and explain a refused save
add a fixed plot size option to the plots pane (#18895)