plotly / plotly/plotly.R

boxplots are always placed below other geometries regardless of order

Offen
#1,839 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
R
Sterne
2.7k
Forks
641
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das gemeldete ggplotly(bp)-reprex mit den angegebenen Versionen von R, ggplot2 und plotly auszuführen, und vergleiche anschließend die Reihenfolge der Ebenen in ggplot und in der gerenderten Ausgabe. Als erledigt gilt die Aufgabe, wenn Boxplots die Reihenfolge der Geometrien respektieren und der gemeldete TypeError in der Ausgabe des reprex nicht mehr auftritt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
r
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.