plotly / plotly/plotly.R

Improper alignment of boxplots in facets

未關閉
#697 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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")

boxplots

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從提供的 ggplot2 和 ggplotly 重現範例開始,著重於分面箱型圖的轉換與定位方式。重現此範例,並驗證兩個分面中的箱型圖都以其類別為中心,同時保留分組版面配置行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
r
領域
data-visualization
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。