plotly / plotly/plotly.R

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

Aperta
#2,242 1 commento 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

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).

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 dal punto di ingresso plotly::ggplotly() e riproduci l'avviso usando l'esempio fornito con iris, ggplot2, geom_boxplot() e geom_pointrange(). Traccia come viene assemblata la box trace; il lavoro è completato quando l'esempio viene visualizzato senza l'avviso 'mode' non valido, mentre il comportamento normale di ggplot2 rimane invariato.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.