Questions tagged [plot-grid]

7 questions
2
votes
2 answers

R: cowplot plot_grid centering single figure on one row

With three individual plots plot1, plot2 and plot3, the command plot_grid(plot1, plot2, plot3, ncol = 2) creates a 2 x 2 plot area, in which the top row consists of two plots and the bottom row of a single plot aligned to the left. Hence, the bottom…
Maarölli
  • 375
  • 1
  • 3
  • 13
1
vote
1 answer

Network image from Cytoscape to R

I've made several netweorks using Cytoscape and want to combine them into one labeled plot grid (A, B, C, D) to use for publication later. Is there a way to do this with RCy3? I tried to save the documentation's createNetworkFromDataFrames example…
1
vote
0 answers

recordPlot() not showing in plot_grid() in newer versions of R

I was trying to run a code from a year ago that uses recordPlot() function and then plots it using plot_grid() from the cowplot package. While the code still works on my old computer with R 4.1.1 using RStudio 2021.09.0 it does not work on my fresh…
Katerina S
  • 11
  • 2
0
votes
0 answers

How to prevent grid.arrange() truncating plots captued with recordPlot()

Here is a simplified MWE of my issue. How can I edit the grids or the grid.arrange parameters so that both panels show without truncation?. library(cowplot) plot(1:5, 1:5) p1 <- recordPlot() plot(1:10, 1:10) p2 <-…
bioSlayer
  • 85
  • 5
0
votes
0 answers

Display multiple plots in Rmarkdown

I have the code below that generates upto 150 plots. My aim is to output the plots in groups of 4 by 4 in each page of my word/pdf output in Rmarkdown. For example if the number of plots is 80 i want the ouput to be 5 pages with 16 images…
0
votes
0 answers

cowplot::plot_grid() cuts off subplot edges if subplot much bigger than the other (happens at printing image into word file)

I have two tileplots: library(ggplot2) l1 <- 50 ncols <- 3 m1 <- matrix(rexp(l1*3, rate = .1), ncol = 1) %>% as.data.frame() %>% cbind(Comparison = rep(c("T1 vs C", "T2 vs C", "T3 vs C"), each = l1)) %>% cbind(ID =…
schd
  • 3
  • 1
0
votes
1 answer

Add additional head and row titles within a ggplot figure (plot_grid)

I have data such as: library(ggplot2) library(cowplot) library(ggpubr) theme_set(theme_cowplot()) df1 <- data.frame(x = 1:12, y = (1:12)^2) df1$grp = c('A', 'B', 'C') df2 <- data.frame(x = 1:12, y = (1:12)^2) df2$grp = c('D', 'E') df3 <-…
chippycentra
  • 3,396
  • 1
  • 6
  • 24