Improper alignment of boxplots in facets
未关闭
还没有人认领这个 Issue。
ggplotly
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
first of all, thanks for a great package!
I have spent some time with it recently and I think that I have found a bug. If I use boxplots and facets, the boxplots in the upper facet are on the left side of the category while the boxplots in the bottom facet are on the right side of the category, while I believe that they should be aligned in the middle. Picture tells more than thousands words, so see bellow...
you can get it with the following code:
library(ggplot2)
library(plotly)
data.1 <- diamonds
data.1$set <- "set1"
data.2 <- data.1
data.2$set <- "set2"
my.data <- rbind(data.1, data.2)
p <- ggplot(my.data, aes(x=cut, y=price, fill= clarity))+
geom_boxplot()+
facet_grid(set ~ .)
ggplotly(p)%>%
layout(boxmode = "group")

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从提供的 ggplot2 和 ggplotly 复现示例开始,重点关注分面箱线图的转换和定位方式。重现该示例,并验证两个分面中的箱线图都以其类别为中心,同时保留分组布局行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100