plotly / plotly/plotly.R

dynamicTicks = TRUE with facet_wrap() and categorical axis

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

还没有人认领这个 Issue。

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

描述

It seems that dynamicTicks=TRUE in ggplotly is working for categorical data only when the plot is not faceted. Is there a reason for that or is this part of the bug you were working on here: https://github.com/ropensci/plotly/issues/860?

library("ggplot2")
library("plotly")

p1 <- ggplot(mtcars) + 
  geom_line(aes(x=as.factor(hp), y=mpg, group=1))


p2 <- ggplot(mtcars) + 
      geom_line(aes(x=as.factor(hp), y=mpg, group=1)) +
      facet_wrap(vars(gear))

#non faceted plot works
ggplotly(p1, dynamicTicks = TRUE)

#faceted plot does not work
ggplotly(p2, dynamicTicks = TRUE)

贡献指南

打开贡献指南

从这里开始

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

调研方向

运行提供的 R 示例,针对带有 dynamicTicks=TRUE 的 ggplotly(),比较未分面化的 p1 与 facet_wrap() 版本 p2。从此入口点追踪 dynamicTicks 和 facet_wrap() 的处理;完成标准是:分类轴在分面图中与未分面图一样一致地使用动态刻度。

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

评估

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

把新 issue 发到你的邮箱

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