ggplotly breaks custom, log transformed, axis labels
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Unfortunately this does not show an error, only a warning. A better behavior would probably be returning an error when passing an expression.
See below for an example where the x axis has been log transformed.
plot_gg = ggplot(iris,aes(Sepal.Length,Sepal.Width,col=Species))+
geom_point()+
scale_x_continuous(trans = scales::log2_trans(),
breaks = scales::trans_breaks("log2", function(x) 2^x),
labels = scales::trans_format("log2", scales::math_format(2^.x)))
plot_gg

plot_ly=plotly::ggplotly(plot_gg)
plot_ly

Warning message:
In is.na(ticktext) :
is.na() applied to non-(list or vector) of type 'expression'
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行 issue 中的 R 示例,并将 ggplot2 的输出与 ggplotly 的输出和警告进行比较。跟踪 ggplotly 如何处理经过变换的坐标轴刻度和表达式值标签;当该行为是有意设计的,并且由回归检查覆盖时即表示完成,可以通过正确处理这些标签,或清楚地报告不支持的表达式来实现。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100