Integration with geom_phylopic()
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 developing a shiny app for a data visualisation dashboard, I encountered an issue that geom_phylopic() isn't integrated with plotly yet. I have pasted the error below. Is there any plans to have this integrated? I (think I) have created a reprex showing two plots that work and the one with plotly with the error.
Thanks,
Jo
geom_GeomPhylopic() 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
library(rphylopic)
library(ggplot2)
library(plotly)
# get image from phylopic and set up df
silhouette.img <- get_phylopic(uuid = get_uuid(name = "Sphyrnidae", n=1)) # hammerhead
silhouette.df <- data.frame(x=1, y=9)
# make some fake data
df = data.frame(x=c(1:10),
y=c(1:10))
# this plot works
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
# geom_phylopic(data = silhouette.df, aes(x = x, y = y),
# size = 1, col='purple',
# img = silhouette.img) +
xlim(0,10)
p %>% ggplotly(tooltip = c("x"))
# this plot works
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
geom_phylopic(data = silhouette.df, aes(x = x, y = y),
size = 1, col='purple',
img = silhouette.img) +
xlim(0,10)
p
# this plot does not work
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
geom_phylopic(data = silhouette.df, aes(x = x, y = y),
size = 1, col='purple',
img = silhouette.img) +
xlim(0,10)
p %>% ggplotly(tooltip = c("x"))
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza ejecutando el reprex de R proporcionado con geom_phylopic() y ggplotly() para reproducir el error de geom no compatible. Lee el manejo existente de ggplotly() para geoms no compatibles y determina cómo se prueba esta integración. Se considera terminado cuando el ejemplo se renderiza mediante ggplotly() sin el error de implementación, conservando la imagen de phylopic representada y el comportamiento del tooltip.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- plotly, r
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100