plotly / plotly/plotly.R

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

未关闭
#2,242 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 plotly::ggplotly() 入口开始,使用提供的 iris、ggplot2、geom_boxplot() 和 geom_pointrange() 示例重现警告。跟踪 box trace 的组装过程;完成标准是示例渲染时不再出现无效的 'mode' 警告,同时普通 ggplot2 行为保持不变。

由索引模型根据 Issue 内容生成。

评估

技术栈
r
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。