ggplotly not working when plotting circular ggtree
Personne n'a encore pris cette issue.
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire l’exemple signalé avec plotly::ggplotly(), ggtree(tree, layout="circular") et geom_tiplab(). Comparez-le avec la disposition de dendrogramme fonctionnelle et examinez l’avertissement de geom_GeomTextGGtree. Le travail est terminé lorsque le graphique circulaire est converti sans l’erreur ni les avertissements signalés, tout en conservant les étiquettes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100