facet_wrap causing NA values
未關閉
還沒有人認領這個 Issue。
bug
ggplotly
- 主要語言
- R
- 星號
- 2.7k
- 分支
- 641
- PR 合併指標
- 30 天內沒有已合併 PR
描述
The upper tile in the following example is changed by ggplotly. I assume it is grey because it is somehow NA. Only occurs when faceting is used.
test <- structure(list(week = c(7L, 7L, 32L), day = structure(c(5L, 6L,
1L), .Label = c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat",
"Sun"), class = c("ordered", "factor")), year = c(2017, 2017,
2015), `Samples #` = c(31L, 49L, 20L)), class = c("tbl_df", "tbl",
"data.frame"), row.names = c(NA, -3L), .Names = c("week", "day",
"year", "Samples #"))
p <- ggplot(data = test, aes(x = day, y = week, fill = `Samples #`, height = 1)) +
geom_tile() +
facet_wrap(~year, ncol = 1)
p

ggplotly(p)

貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先執行提供的 R 重現程式,使用 ggplot、geom_tile、facet_wrap 和 ggplotly(p),然後將分面輸出與原始圖進行比較。使用分面時,如果上方的 tile 保持正確的值和外觀,而不是變成灰色或 NA,就表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- r
- 領域
- data-visualization
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100