plotly / plotly/plotly.R

boxplots are always placed below other geometries regardless of order

Aperta
#1,839 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
R
Stelle
2.7k
Fork
641
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

image

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia eseguendo il reprex ggplotly(bp) segnalato con le versioni indicate di R, ggplot2 e plotly, quindi confronta l’ordine dei layer di ggplot e dell’output renderizzato. Il lavoro è completato quando i boxplot rispettano l’ordine della geometria e il TypeError segnalato non si verifica più nell’output del reprex.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
r
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.