plotly / plotly/plotly.R

Interactive facets in ggplotly

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

还没有人认领这个 Issue。

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

描述

Currently a plot like this:

library(reshape2)
library(plotly)
p <- ggplot(tips, aes(x=total_bill, y=tip/total_bill)) + geom_point(shape=1)
p <- p + facet_wrap( ~ day, ncol=2)
fig <- ggplotly(p)
fig

does not have any interactive elements for the facets. A few improvements would be:

  • Show a dropdown list with the title of the facets to allow selecting one facet or "All" (there does not seem to be an easy way nor an example to do this)
  • Click in the facet title shows only that subplot (zooms). The user can reset the zoom as usual.
  • Show a list of facet title that work similar to the legend: single-click shows/hides the facet, double-click shows only this facet/shows all facets.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先使用 ggplotly(p)、facet_wrap 和 tips 数据运行 issue 中的 R 示例,以复现当前的分面行为。检查 ggplotly 如何表示分面子图,并确定提出的三种交互模式中的哪一种是预期模式;完成的要求是达成一致的分面交互,并且选择或可见性行为能够正常工作。

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

评估

技术栈
r
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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