-
Notifications
You must be signed in to change notification settings - Fork 2.1k
"Copy as metafile" in Rgui, as well as default ggsave(), scale the whole figure to the top left quarter #6349
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
Comments
Thanks for the report! I cannot reproduce this on my end on Windows 11 R 4.4.2 and ggplot2 3.5.1. Opening the .wmf file in paint or affinity designer just shows the plot panel filling all the appropriate area. Using the 'copy as metafile' option in the RGui seems normal too. library(grid)
grid.newpage()
grid.draw(rectGrob(width = 0.9, height = 0.9)) |
Thanks @teunbrand. Your code produces the same faulty behaviour on my setup. It is however true that there might perhaps be some non-determinism in this. Because I observed the issue a month ago with different code, and not with this one, after I restarted the R session, now I observe it with this one. |
Plots and the grid based rectangle rectangle above should dynamically adapt to fit the available size reported by the device during rendering. Based on #4541 (comment), you might try to set |
Thanks @teunbrand.
|
Thanks for confirming with |
I have exactly the same problem as reported here, not sure why that one was closed.
When I produce ggplot2 and then right click the chart and select "Copy as metafile" (in the standard Rgui in Windows), it scales the whole figure just in the top left quarter like this:
ggsave("cover.wmf")
.Reproducible code:
ggplot2 version 3.5.1 in R 4.4.1
The text was updated successfully, but these errors were encountered: