Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

top annotation showing no hovertext #304

Open
ricoderks opened this issue Apr 2, 2024 · 4 comments
Open

top annotation showing no hovertext #304

ricoderks opened this issue Apr 2, 2024 · 4 comments
Labels

Comments

@ricoderks
Copy link

If I added a top annotation with col_side_colors the hovertext is not shown, except for the first column. This only happens when the plot_method is set to "plotly". When I use row_side_colors the hovertext is nicely shown for each cell.
It works for both when I set the plot_method to "ggplot", but then I don't have the colorbars for the annotation.

An example:

library(heatmaply)

set.seed(123)
m <- matrix(rnorm(100),
            nrow = 5)

col_ann <- data.frame(group1 = letters[1:20])
row_ann <- data.frame(group2 = LETTERS[1:5])

heatmaply(m,
          col_side_colors = col_ann,
          row_side_colors = row_ann,
          plot_method = "ggplot")

heatmaply(m,
          col_side_colors = col_ann,
          row_side_colors = row_ann,
          plot_method = "plotly")

I'am using version 1.5.0 of heatmaply.

cheers, Rico

@ricoderks ricoderks added the bug label Apr 2, 2024
@talgalili
Copy link
Owner

Hi,
I can't reproduce.
Could you please share a screenshot with the issue?
And also share
sessionInfo()
?

Thanks.

@ricoderks
Copy link
Author

ricoderks commented May 21, 2024

Hi,

I added two screenshots. In the first screenshot the mouse hovers over the first column of the top annotation and in the second screenshot the mouse hovers over the fourth column (unforntunately the mouse pointer is not recorded on the screenshot).
I used the same code as above.
plotly1
plotly2

@ricoderks
Copy link
Author

Sorry, I just noticed that I forgot to share the session info!!

R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=nl_NL.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=nl_NL.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=nl_NL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Amsterdam
tzcode source: system (glibc)

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

other attached packages:
 [1] tidyr_1.3.1         dplyr_1.1.4         reshape2_1.4.4     
 [4] pcaMethods_1.96.0   Biobase_2.64.0      BiocGenerics_0.50.0
 [7] glmnet_4.1-8        Matrix_1.6-5        RColorBrewer_1.1-3 
[10] readxl_1.4.3        stringr_1.5.1       waiter_0.2.5       
[13] ellipse_0.5.0       ggupset_0.3.0       ggpubr_0.6.0       
[16] heatmaply_1.5.0     viridis_0.6.5       viridisLite_0.4.2  
[19] plotly_4.10.4       gridExtra_2.3       ggplot2_3.5.1      
[22] shinyvalidate_0.1.3 shinybrowser_1.0.0  shinyWidgets_0.8.6 
[25] bs4Dash_2.3.3       shinyjs_2.1.0       markdown_1.13      
[28] rmarkdown_2.27      shiny_1.8.1.1      

loaded via a namespace (and not attached):
 [1] rlang_1.1.4       magrittr_2.0.3    compiler_4.4.1    vctrs_0.6.5      
 [5] pkgconfig_2.0.3   shape_1.4.6.1     fastmap_1.2.0     backports_1.5.0  
 [9] labeling_0.4.3    fontawesome_0.5.2 ca_0.71.1         utf8_1.2.4       
[13] promises_1.3.0    purrr_1.0.2       xfun_0.45         cachem_1.1.0     
[17] jsonlite_1.8.8    later_1.3.2       broom_1.0.6       R6_2.5.1         
[21] bslib_0.7.0       stringi_1.8.4     car_3.1-2         jquerylib_0.1.4  
[25] cellranger_1.1.0  Rcpp_1.0.12       assertthat_0.2.1  iterators_1.0.14 
[29] knitr_1.47        httpuv_1.6.15     splines_4.4.1     igraph_2.0.3     
[33] tidyselect_1.2.1  yaml_2.3.8        rstudioapi_0.16.0 abind_1.4-5      
[37] TSP_1.2-4         fresh_0.2.0       codetools_0.2-19  plyr_1.8.9       
[41] lattice_0.22-5    tibble_3.2.1      withr_3.0.0       evaluate_0.24.0  
[45] survival_3.7-0    pillar_1.9.0      carData_3.0-5     DT_0.33          
[49] foreach_1.5.2     generics_0.1.3    commonmark_1.9.1  munsell_0.5.1    
[53] scales_1.3.0      xtable_1.8-4      glue_1.7.0        lazyeval_0.2.2   
[57] tools_4.4.1       dendextend_1.17.1 data.table_1.15.4 webshot_0.5.5    
[61] ggsignif_0.6.4    registry_0.5-1    visNetwork_2.1.2  grid_4.4.1       
[65] crosstalk_1.2.1   seriation_1.5.5   colorspace_2.1-0  networkD3_0.4    
[69] cli_3.6.2         fansi_1.0.6       gtable_0.3.5      rstatix_0.7.2    
[73] sass_0.4.9        digest_0.6.35     farver_2.1.2      htmlwidgets_1.6.4
[77] memoise_2.0.1     htmltools_0.5.8.1 lifecycle_1.0.4   httr_1.4.7       
[81] mime_0.12      

@alanocallaghan
Copy link
Collaborator

I'm sure I've seen this before with both ggplotly and plotly methods, but I can't find the old issue. You can probably get around it by hiding the top dendrogram, though I appreciate that's not ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants