plotly / plotly/plotly.R

ggplotly not working when plotting circular ggtree

Abierto
#2,241 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
R
Estrellas
2.7k
Forks
641
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo el ejemplo reportado con plotly::ggplotly(), ggtree(tree, layout="circular") y geom_tiplab(). Compáralo con el diseño de dendrograma que funciona e inspecciona la advertencia de geom_GeomTextGGtree. Se considera terminado cuando el gráfico circular se convierte sin el error ni las advertencias reportados, conservando las etiquetas.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.