boxplots are always placed below other geometries regardless of order
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
Hi there
I noticed that with ggplotly() taking a ggplot object, the layering of geometries is not respected by boxplots, which always end up underneath everything else (in my testing at least).
See this reprex:
library(ggplot2)
bp <- ggplot(mpg, aes(x = class, y = hwy)) +
geom_jitter(colour = "orange") +
geom_boxplot()
# jitter is below boxplots
bp

# ggplotly puts boxplot underneath everything else
library(plotly)
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
ggplotly(bp)
#> TypeError: Attempting to change the setter of an unconfigurable property.
#> TypeError: Attempting to change the setter of an unconfigurable property.

Created on 2020-08-19 by the reprex package (v0.3.0)
Interestingly, the TypeError doesn't show up in my console, but it does in the reprex output.
Using R 4.0.2 on Ubuntu 18.04 with RStudio 1.3.1073, ggplot2 3.3.2 and plotly 4.9.2.1
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
Comienza ejecutando el reprex informado de ggplotly(bp) con las versiones indicadas de R, ggplot2 y plotly, y luego compara el orden de las capas en ggplot y en la salida renderizada. Se considera completado cuando los boxplots respetan el orden de las geometrías y el TypeError informado ya no se produce en la salida del reprex.
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