Skip to content
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

Blank plot using plot_grid with RNotebook #187

Open
wided-lbn opened this issue Jul 9, 2022 · 0 comments
Open

Blank plot using plot_grid with RNotebook #187

wided-lbn opened this issue Jul 9, 2022 · 0 comments

Comments

@wided-lbn
Copy link

When using cowplot with RNotebook an additional blank plot is created before the requested plot.
For example, the advice given by a member to open a null pdf device when converting plots doesn't work for me.


#See outliers
#par(mfrow=c(2,2))
library(cowplot)
library(ggplot2)
p1 <- plot(mod_final,5)
p2 <- influenceIndexPlot(mod_final,vars="Studentized")
p3 <- influenceIndexPlot(mod_final,vars="hat") 
p4 <- influenceIndexPlot(mod_final,vars="cook")
#grid.arrange(p1, p2, p3, p4, nrow=2, ncol=2)
#plot_grid(p1, p2, p3, p4, align = "v", nrow = 2)
#plot_grid(stud, hat, cook, res, ncol = 2, nrow = 2)
grDevices::pdf(NULL)
p5 <- plot_grid(p1, p2, p3, p4, labels = "AUTO")
grDevices::dev.off()
p5

image

thanks for your help, needing it to reduce a number of pages when submitting a project in pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant