An incomprehensible error with R package gggenes
1
0
Entering edit mode
12 weeks ago

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?

R gggenes visualize • 476 views
ADD COMMENT
1
0
Entering edit mode

Thank you. I asked a stupid question.

ADD REPLY
0
Entering edit mode

It's not stupid, just a bit lazy ;-)

ADD REPLY

Login before adding your answer.

Traffic: 2213 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6