Unclear Warning message: 'box' objects don't have these attributes: 'mode'
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the plotly::ggplotly() entry point and reproduce the warning using the provided iris, ggplot2, geom_boxplot(), and geom_pointrange() example. Trace how the box trace is assembled; done means the example renders without the invalid 'mode' warning while plain ggplot2 behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100