plotly / plotly/plotly.R

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

Aperta
#2,167 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
R
Stelle
2.7k
Fork
641
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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     

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziare con l’esempio fornito ggplotly(facet_wrap(...)) e verificare come vengono visualizzate le righe dei facet e le etichette dell’asse y. Riprodurre la sovrapposizione con un dataset pubblico minimo; il lavoro è completato quando i valori “H” della riga centrale rimangono visibili senza essere coperti dalle etichette dei facet della riga inferiore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
r
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.