ggplotly not working when plotting circular ggtree
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das gemeldete Beispiel mit plotly::ggplotly(), ggtree(tree, layout="circular") und geom_tiplab() zu reproduzieren. Vergleiche es mit dem funktionierenden Dendrogramm-Layout und untersuche die geom_GeomTextGGtree-Warnung. Als erledigt gilt die Aufgabe, wenn der kreisförmige Plot ohne den gemeldeten Fehler und ohne Warnungen konvertiert wird und die Beschriftungen erhalten bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100