Entering edit mode
12 months ago
alice005201314
•
0
I tried drawing with sample code and sample data. The package was libraried without errors or warnings.
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")
But something went wrong unexpectedly.
Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), :
Viewport has zero dimension(s)
There's nothing wrong with the data.
> head(example_genes)
molecule gene start end strand orientation
1 Genome1 genA 15389 17299 reverse 1
2 Genome1 genB 17301 18161 forward 0
3 Genome1 genC 18176 18640 reverse 1
4 Genome1 genD 18641 18985 forward 0
5 Genome1 genE 18999 20078 reverse 1
6 Genome1 genF 20086 20451 forward 1
Can anyone help me explain why?
Thank you. I asked a stupid question.
It's not stupid, just a bit lazy ;-)