Issue with marker size when using animated graph
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
When attempting to size markers in an animated graph, the sizing is incorrect unless the data.frame is first ordered correctly.
In the example below the markers should:
- Increase in size, then decrease again
- Decrease in size, then increase again
- Decrease in size
- Increase in size
- Iterate between small and large
I think it may have something to do with a warning I get 'arrange_()' is deprecated as of dplyr 0.7.0
Please use 'arrange()' instead
I'm using dplyr 1.0.0 and plotly 4.9.2.1
# data
data <- data.frame(xaxis = rep(as.character(c(1:5)), each = 10),
yaxis = rep(c(1:5,5:1), 5),
size = c(
c(seq(1,10,2), seq(10,1,-2)),
c(seq(10,1,-2), seq(1,10,2)),
c(1:10),
c(10:1),
rep(c(1,10), 5)
),
frame = c(1:10)
)
# example 1, unordered
plot_ly(
data = data,
x = ~xaxis,
y = ~yaxis,
frame = ~frame,
type = 'scatter',
marker = list(size = ~size*10),
mode = 'markers'
)
# example 2, ordered
data <- data[order(data$frame),]
plot_ly(
data = data,
x = ~xaxis,
y = ~yaxis,
frame = ~frame,
type = 'scatter',
marker = list(size = ~size*10),
mode = 'markers'
)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 dplyr 1.0.0 和 plotly 4.9.2.1 运行提供的 R 复现程序,然后跟踪动画 marker 的大小计算以及已弃用的 arrange_() 路径。当无序数据产生列出的五种大小模式,并且相关的弃用警告得到处理时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- plotly, r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100