geom_xspline not implemented in plotly - getting error message when using ggplotly() function
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- r
- Área
- data-visualization
Línea de trabajo
Reproduce el fallo con el ejemplo airmiles proporcionado, geom_xspline y ggplotly(). Lee la documentación de custom-geoms enlazada en la issue y, después, inspecciona el enfoque to_basic() descrito allí. La tarea estará terminada cuando geom_xspline se pueda convertir en un objeto plotly, o cuando se documenten la limitación admitida y el workaround.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I get an error message when trying to implement geom_xspline with
plotly.
I get the desired graph in ggplot2 but the plot cannot be converted to a
plotly object when using the ggplotly function.
You can find the code showcasing this below.
library(pacman)
pacman::p_load(tidyverse, datasets, plotly, ggplotly, ggalt)
# airmiles built-in dataset:
airmiles <- datasets::airmiles
year <- 1937:1960
airmiles <- data.frame(year = year, airmiles = airmiles)
# "line" plot using geom_xspline from ggalt package:
plot_airmiles <- ggplot(data = airmiles,
aes(x = year, y = airmiles)) +
geom_point(alpha = 0.75) +
geom_xspline(spline_shape = -0.7) +
scale_y_continuous(n.breaks = 10)
plot_airmiles
# interactive plot: using ggplotly doesn't work
ggplotly(plot_airmiles)
Could this be implemented in plotly? Is there any way I can still
produce the interactive graph in plotly without waiting for this to be
implemented?
The plotly documentation (https://linking.plotly-r.com/custom-geoms)
mentions the possibility of creating custom geoms and using the
to_basic() function from the plotly package to “convert” the custom geom
into a geom plotly understands.
In the link above, the authors provide an example for geom_xspline
specifically but their method and code don’t work unfortunately.
- Lenguaje dominante
- R
- Estrellas
- 2.7k
- Forks
- 641
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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.
Más de plotly/plotly.R
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
-
Data gets dropped in add_trace and consequently points have the wrong color if NA is present Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
-
save_image Error Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
Todos los issues de plotly/plotly.R
Issues similares
-
documentation pkg infrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
epiverse-trace/epiparameter#511 ·
-
Stray pipe in eventRemarks Abiertofunction:write_dwc
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
jbkunst/highcharter#849 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
r-lib/pkgdepends#485 · 3 comentarios ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100