ggplotly does not respect group variable when used with color variable
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
The following is affecting my ability to use ggplotly:
When color = Species and group = 1, all dots should be connected, irrespective of species, but ggplotly does not respect the group variable and it is as if I only wrote color = Species.
Thanks for your work on this great library! If there is a workaround please let me know.
With ggplotly:

only ggplot:

ggplotly(ggplot(data = iris) +
geom_line(mapping = aes(Sepal.Length, Sepal.Width, color = Species, group = 1)) +
geom_point(mapping = aes(Sepal.Length, Sepal.Width, color = Species, group = 1)))
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从提供的 ggplotly 调用开始,使用 iris、geom_line、geom_point、color = Species 和 group = 1,然后将其输出与纯 ggplot 结果进行比较。跟踪 ggplotly 在同时映射 color 变量时如何处理 group 变量;当点像 ggplot 输出中那样跨物种连接时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100