Translate JSON references in docs to R equivalents
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Is this an error in the documentation for R? This is for heatmap > colorscale section link:
Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in z space, use zmin and amax
Two things, first it's missing a ']'. That's far less important as you can't feed R an array using that syntax. If I take the example from the site:
plot_ly(z = volcano, type = "heatmap")
And I create a var called 'colScale' to add a custom colorscale value, then this (going by the documentation) won't work:
colScale = [[0, 'rgb(10,0,50)'], [1, '#rgb(50,100,10)']]
It gives me an error (in R itself, not in the attempt to draw the plot). If I make a list and add it to the sample it works:
colScale= list(c(0, "rgb(10,0,50)"),list(1, "rgb(50,100,10)"))
plot_ly(z = volcano, type = "heatmap" , colorscale = colScale)
Using a simple 'Find' command it looks like there are multiple instances of the array syntax in the R documentation on the site.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 heatmap colorscale 参考资料开始,并在 R 文档中搜索报告的数组语法。将受影响的示例更新为有效的 R 等效写法,包括 heatmap colorscale 示例,并确认文档不再将 JSON 风格的数组表示为 R 代码。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization, documentation
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100