plotly / plotly/plotly.R

marker size is incorrect when colouring / grouping variable is non-numeric

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

还没有人认领这个 Issue。

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

描述

The first two markers should be small, the next two large. Instead, the first and third are small, and the second and fourth are large:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, marker = list(size = c(5, 5, 10, 10)), color = c("1", "2", "1", "2"))

Grouping on a numeric variable makes the bug disappear:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, marker = list(size = c(5, 5, 10, 10)), color = c(1, 2, 1, 2))

I am running R 3.6.3 on RHEL 7.6 with plotly 4.9.2.1

贡献指南

打开贡献指南

从这里开始

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

调研方向

未指定源文件或测试。首先运行 issue 中的两个 plot_ly 示例,并跟踪字符颜色分组与数值颜色分组如何转换为标记数据;当两种情况下大小值都与其原始观测保持对齐,并且添加了回归测试覆盖时,即完成。

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

评估

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

把新 issue 发到你的邮箱

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