gggenes icon indicating copy to clipboard operation
gggenes copied to clipboard

Error in grid.Call

Open liuqian666 opened this issue 2 years ago • 1 comments

Sorry for disturb you. But I've met trouble when I using gggenes. here're my code:

library(ggplot2) library(gggenes) ggplot(example_genes, aes(xmin = start, xmax = end, y = molecule, fill = gene)) + geom_gene_arrow() + facet_wrap(~ molecule, scales = "free", ncol = 1) + scale_fill_brewer(palette = "Set3") Then the screen shows : Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), : Viewport has zero dimension(s)

I've tried to update Rstudio and all the other packages, but the problem was still unsolved. Anybody can help me? Thank you very much.

liuqian666 avatar Oct 19 '21 05:10 liuqian666

I had the same problem and I found here https://github.com/slowkow/ggrepel/issues/113 that this is a problem related to graph dimensions. I tried this option + theme(legend.position="none") and worked for me.

ireneortega avatar Dec 09 '21 09:12 ireneortega