plotly / plotly/plotly.R

Unclear Warning message: 'box' objects don't have these attributes: 'mode'

Offen
#2,242 1 Kommentar 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

Thank you for your great work, a big step forward in data visualization!

Unfortunately, similar to #1560, I get a confusing warning, if I render a plot.ly created by plotly::ggplotly(.):

Warning message:
'box' objects don't have these attributes: 'mode'
Valid attributes include:
'alignmentgroup', 'boxmean', 'boxpoints', 'customdata', 'customdatasrc', 'dx', 'dy', 'fillcolor', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hoveron', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'jitter', 'legendgroup', 'legendgrouptitle', 'legendrank', 'line', 'lowerfence', 'lowerfencesrc', 'marker', 'mean', 'meansrc', 'median', 'mediansrc', 'meta', 'metasrc', 'name', 'notched', 'notchspan', 'notchspansrc', 'notchwidth', 'offsetgroup', 'opacity', 'orientation', 'pointpos', 'q1', 'q1src', 'q3', 'q3src', 'quartilemethod', 'sd', 'sdsrc', 'selected', 'selectedpoints', 'showlegend', 'stream', 'text', 'textsrc', 'transforms', 'type', 'uid', 'uirevision', 'unselected', 'upperfence', 'upperfencesrc', 'visible', 'whiskerwidth', 'width', 'x', 'x0', 'xaxis', 'xcalendar', 'xhoverformat', 'xperiod', 'xperiod0', 'xperiodalignment', 'xsrc', 'y', 'y0', 'yaxis', 'ycalendar', 'yhoverforma [... truncated] 

To reproduce, please use the following minimum iris example:

library(ggplot2)
plotly::ggplotly(ggplot(iris, 
                        aes(x = Species,
                            y = Sepal.Length,
                            ymin = 1, 
                            ymax = 10)) +
                   geom_boxplot() +
                   geom_pointrange() 
                 )

The plain ggplot2 print works.

I have tested this on version 4.10.1 of plotly on an Intel Mac with R 4.1.0 and ggplot2 vesion 3.4.0.

Thank you for considering a fix, so that I can avoid to suppress warnings here (I'm using plotly from a CRAN package).

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 mit dem plotly::ggplotly()-Einstiegspunkt und reproduziere die Warnung anhand des bereitgestellten Beispiels mit iris, ggplot2, geom_boxplot() und geom_pointrange(). Verfolge, wie der Box-Trace zusammengesetzt wird; abgeschlossen ist die Aufgabe, wenn das Beispiel ohne die ungültige 'mode'-Warnung gerendert wird, während das normale ggplot2-Verhalten unverändert bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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