ggplotly not working when plotting circular ggtree
Nessuno ha ancora preso questa issue.
- Lingua principale
- R
- Stelle
- 2.7k
- Fork
- 641
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello,
When I try to plot through ggplotly a graph generated through ggree with circular layout it results in a error.
Example code and error:
library(MicrobiotaProcess)
library(ggtree)
data(kostic2012crc)
taxa <- tax_table(kostic2012crc)
tree <- as.treedata(taxa, include.rownames=TRUE)
ggtree(tree, layout="circular", size=0.2) +
geom_tiplab(size=1) ->p
plotly::ggplotly(p)
ERROR:
Error in rng[[xy]]$get_labels() : attempt to apply non-function
In addition: Warning messages:
1: In min(z[["x"]]$dimension %()% z$x.range %||% z$x_range) :
no non-missing arguments to min; returning Inf
2: In max(z[["x"]]$dimension %()% z$x.range %||% z$x_range) :
no non-missing arguments to max; returning -Inf
3: In min(z[["y"]]$dimension %()% z$y.range %||% z$y_range) :
no non-missing arguments to min; returning Inf
4: In max(z[["y"]]$dimension %()% z$y.range %||% z$y_range) :
no non-missing arguments to max; returning -Inf
5: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextGGtree() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
6: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextGGtree() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
When I try with ggtree(tree, layout="dendrogram", size=0.2) +
geom_tiplab(size=1) ->p
plotly::ggplotly(p)
It works.
It seems that it does not like the circular format.
Any tips?
Thanks
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l’esempio segnalato con plotly::ggplotly(), ggtree(tree, layout="circular") e geom_tiplab(). Confrontalo con il layout del dendrogramma funzionante e analizza l’avviso di geom_GeomTextGGtree. Il lavoro è completato quando il grafico circolare viene convertito senza l’errore e gli avvisi segnalati, mantenendo le etichette.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100