sqjin/CellChat

Can not save multiple figures in a page in pdf device

yudalang3 opened this issue · 0 comments

Problem:

What I expect,:
image

But I got:
image

So the problem is:
When I use the following code to save the figure, it can not save figures in one page:

# pdf("figs/2.Detailed_HierarchyPlot.pdf",width = 9, height = 4)
png("figs/2.Detailed_HierarchyPlot.png",width = 1000, height = 400)
par(mfrow = c(1, 2), xpd = TRUE)

dev.off()

What I have tried

I read the sources code, And I certain that the problem is caused by the gg <- recordPlot() operation.

Because I remove the gg <- recordPlot() code, it produce the correct code.

Any help for me ?

So, can author remove the codes?