plotly / plotly/plotly.R

facet_wrap: middle row plotted differently from top and bottom facet rows

オープン
#2,167 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

You can see from the attached plot that the middle row of faceted plot is missing the "H" values (y-axis), since the facet labels for the bottom row are covering those "H" values (Note: I'm not showing all of the data in the plot; just what is relevant).

Screen Shot 2022-08-14 at 5 24 44 PM

I cannot provide a full reprex, since the data is private, but my code for that chunk (quarto doc; Rstudio 2022.07.1):

p = annot %>%
  mutate.(`plate row` = `plate row` %>% 
            reorder(`plate row` %>% as.factor %>% as.numeric %>% rev)) %>%
  ggplot(aes(`plate column`, `plate row`, 
             text=`Species name`,
             color=`Strain Viability`, size=`Strain Viability`)) +
  geom_point() +
  scale_x_continuous(breaks=1:12) +
  scale_color_continuous(low='black', high='orange') +
  scale_size_continuous(range = c(1,2)) +
  facet_wrap(~ plate)
ggplotly(p, tooltip='text') %>% 
  layout(autosize = F, width = 800, height = 400)

sessionInfo:

R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] gtsummary_1.6.1   skimr_2.1.4       plotly_4.10.0     tidytable_0.8.0  
[5] data.table_1.14.2 ggplot2_3.3.6     dplyr_1.0.9      

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.2    xfun_0.32           repr_1.1.4         
 [4] purrr_0.3.4         splines_4.2.1       lattice_0.20-45    
 [7] colorspace_2.0-3    vctrs_0.4.1         generics_0.1.3     
[10] htmltools_0.5.3     viridisLite_0.4.0   yaml_2.3.5         
[13] mgcv_1.8-40         base64enc_0.1-3     utf8_1.2.2         
[16] rlang_1.0.4         pillar_1.8.0        glue_1.6.2         
[19] withr_2.5.0         lifecycle_1.0.1     stringr_1.4.0      
[22] commonmark_1.8.0    munsell_0.5.0       gtable_0.3.0       
[25] htmlwidgets_1.5.4   forcats_0.5.1       labeling_0.4.2     
[28] knitr_1.39          fastmap_1.1.0       crosstalk_1.2.0    
[31] fansi_1.0.3         backports_1.4.1     checkmate_2.1.0    
[34] renv_0.15.5         scales_1.2.0        jsonlite_1.8.0     
[37] farver_2.1.1        digest_0.6.29       stringi_1.7.8      
[40] grid_4.2.1          cli_3.3.0           tools_4.2.1        
[43] sass_0.4.2          magrittr_2.0.3      lazyeval_0.2.2     
[46] tibble_3.1.8        crayon_1.5.1        tidyr_1.2.0        
[49] pkgconfig_2.0.3     ellipsis_0.3.2      broom.helpers_1.8.0
[52] Matrix_1.4-1        gt_0.6.0            httr_1.4.3         
[55] R6_2.5.1            nlme_3.1-157        compiler_4.2.1     

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供されている ggplotly(facet_wrap(...)) の例から始め、facet の行と y 軸ラベルがどのように描画されるかを調べます。最小限の公開データセットで重なりを再現します。中央行の「H」の値が下段の facet ラベルに覆われず、表示されたままになれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
r
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。