plotly / plotly/plotly.R

Empty facets when using subplot on multiple facet plots with shareX = TRUE

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

还没有人认领这个 Issue。

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

描述

When running the code below, the first subplot produces 4 empty facets in the two plotlys while the latter produces no empty facets (expected). I notice that the third and fourth xaxis x3 and x4 do not exist in the plotly object xaxis property in $x$data. It seems to be hard capped at two such that the traces intended for the >2 facets are accumulated into the second facet (x2)

library(tidyverse)
library(plotly)
facet_plot <- ggplotly(
  tibble(x = rnorm(75), y = rnorm(75), type = rep(LETTERS[1:3], 25)) %>%
    ggplot(aes(x, y)) + geom_point() + facet_wrap(~ type))
subplot(facet_plot, facet_plot, nrows = 2, shareX = TRUE)
subplot(facet_plot, facet_plot, nrows = 2)

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先运行包含两个分面图的可复现 R 示例,并比较共享 X 和不共享 X 的子图结果。检查 plotly 对象的 x$data xaxis 条目,尤其是 x3 和 x4;完成标准是共享子图保留所有分面轴,并且不出现空分面。

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

评估

技术栈
r
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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