Categories
status

Save ggplot in pdf Use dev.copy2pdf(fil …

Save ggplot in pdf
Use dev.copy2pdf(file=”plot.pdf”)

Example)
plotA <- ggplot() + geom_line(data=nucleosome.mono.colsum, aes(seq, y=A, colour="A") ) plotT <- ggplot() + geom_line(data=nucleosome.mono.colsum, aes(seq, y=T, colour="T") ) arranged.plot <- grid.arrange(plotA, plotT, nrow=2) dev.copy2pdf(file="arranged.plot") dev.off()